Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 8 years ago

Language

Compiler

Options

Author

anonymous

almost 8 years ago

split.h

$
prog.cc: In constructor 'Bar::Bar()':
prog.cc:17:9: error: 'int Foo::mPrivate' is private within this context
         mPrivate=10;    // エラー
         ^~~~~~~~
prog.cc:3:9: note: declared private here
     int mPrivate;
         ^~~~~~~~
prog.cc: In function 'int main()':
prog.cc:27:9: error: 'int Foo::mPrivate' is private within this context
     bar.mPrivate=100;    // エラー
         ^~~~~~~~
prog.cc:3:9: note: declared private here
     int mPrivate;
         ^~~~~~~~
prog.cc:28:9: error: 'int Foo::mProtected' is protected within this context
     bar.mProtected=200;  // エラー
         ^~~~~~~~~~
prog.cc:5:9: note: declared protected here
     int mProtected;
         ^~~~~~~~~~
Exit Code:
1