I was wondering how one would go about creating a structure that cannot be used by itself, i.e. only through a wrapper class.
My question is what would be the syntax for this construct?
I'm currently on a personal project to make simple tests from old tests, all the questions will be written into a binary repository and seekable through this application. If anyone's interested it's for the Irish Leaving Certificate.
The way I've done it so far is as follows:
From classes.hpp
class Student {
public:
static int numberofstudents = 0;
Student(string name);
~Student();
private:
struct address; //Forward declaration of the structure as private.
string name;
int id;
};
struct Student::address{
int housenumber;
string roadname;
bool isdublin;
int dublinareacode;
string countyname;
}
I'm not sure if this is correct however.