Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 7 years ago

Language

Compiler

Options

Author

anonymous

over 7 years ago

$
prog.cc: In instantiation of 'void A<Derived>::showv() [with Derived = fromB]':
prog.cc:40:26:   required from here
prog.cc:7:53: error: 'int fromB::v' is protected within this context
     std::cout << static_cast<const Derived*>(this)->v << std::endl;
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
prog.cc:29:9: note: declared protected here
 int v = 2;
         ^
Exit Code:
1