Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
#include <cstdio>
struct BaseClass {
int the_answer() const { return 42; }
const char* member = "gold";
const char* holistic_detective = "Dirk Gently";
struct DerivedClass : BaseClass {
void announce_agency() {
// This line doesn't compile:
// printf("%s's Holistic Detective Agency\n", holistic_detective); {
int main() {
DerivedClass x;
printf("The answer is %d\n", x.the_answer());
printf("%s member\n", x.member);