fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class AcquireSaveInfo
  5. {
  6. private:
  7. struct resolution
  8. {
  9. double x,y,z;
  10. };
  11. public:
  12. resolution AddResolutionInfo()
  13. {
  14. resolution r;
  15. r.x = 0;
  16. return r;
  17. }
  18. };
  19.  
  20. int main()
  21. {
  22. AcquireSaveInfo a;
  23. AcquireSaveInfo::resolution result = a.AddResolutionInfo();
  24. return 0;
  25. }
Compilation error #stdin compilation error #stdout 0s 3292KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:7:12: error: ‘struct AcquireSaveInfo::resolution’ is private
     struct resolution
            ^
prog.cpp:23:19: error: within this context
  AcquireSaveInfo::resolution result = a.AddResolutionInfo();
                   ^
stdout
Standard output is empty