class Library
{
private:
Book the collection[20];
int noofbooks;
public:
Library ();
~Library ();
void borrowBook(User aUser);
};
ok firstly there is a another two classes called 'User' and 'Book' and a object called
aUser which has been created.
my question is how come in the private data part
'Book the collection[20];' works; can 'Book' (a class) be a variable type ???
Also the 'void borrowBook(User aUser)' part; again is this an example of the class 'User' being written like a variable type, for instance (int intname) ???
Hope this is clear enough, thanks.
{
private:
Book the collection[20];
int noofbooks;
public:
Library ();
~Library ();
void borrowBook(User aUser);
};
ok firstly there is a another two classes called 'User' and 'Book' and a object called
aUser which has been created.
my question is how come in the private data part
'Book the collection[20];' works; can 'Book' (a class) be a variable type ???
Also the 'void borrowBook(User aUser)' part; again is this an example of the class 'User' being written like a variable type, for instance (int intname) ???
Hope this is clear enough, thanks.