#include <iostream> using namespace std; namespace my { class Block { private: int number; }; } int main() { my::Block block; block.number = 1; return 0; }
Standard input is empty
prog.cpp: In function 'int main()': prog.cpp:7:8: error: 'int my::Block::number' is private int number; ^ prog.cpp:13:8: error: within this context block.number = 1; ^
Standard output is empty