My goal is a class like:
class UserInformation { public: userInfo getInfo(int userId); private: struct userInfo { int repu, quesCount, an
If the member function is public, then the return type must be publicly visible! Therefore, move the inner struct definition into the public section.
public
Note also that it must be defined before the function that uses it.