#include <iostream>using namespace std; class AcquireSaveInfo{private: struct resolution { double x,y,z; };public: resolution AddResolutionInfo() { resolution r; r.x = 0; return r; }}; int main() { AcquireSaveInfo a; AcquireSaveInfo::resolution result = a.AddResolutionInfo(); return 0;}
Standard input is empty
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(); ^
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!