hi again every body
i really don't know how it is hard for me to compile and run those problem that i think i understand.
i have this code in my .hh file
1 2 3 4 5 6 7 8 9 10 11
class stuffList{
public:
void printProperties();
void addMembers(stuff &item)
stuffList();
private:
vector<stuff> elementList;
int size;
string dad;
string mom;
string onkle;
string momie;
// intialising some stuff members
stuff fs(dad,34);
stuff f2(mom,21);
stuff f3(onkle,12);
stuff f4(momie, 24);
// intialisation of one stuffList
// to help me to store some stuff in the stuffList
stuffList staffList();
staffList.addMembers( fs);// storing the frist element
staffList.addMembers(f2);// storing the second element
staffList.addMembers(f3);// storing the third element
staffList.addMembers(f4);// storing the fourth element
staffList.printProperties();
}
and here is my problem my addMembers () is not working and i don't know why i try so many different thing i m getting this error :
1 2 3 4 5 6
client.cc: In function 'int main()':
client.cc:26: error: request for member 'addMembers' in 'staffList', which is of non-class type 'stuffList ()()'
client.cc:27: error: request for member 'addMembers' in 'staffList', which is of non-class type 'stuffList ()()'
client.cc:28: error: request for member 'addMembers' in 'staffList', which is of non-class type 'stuffList ()()'
client.cc:29: error: request for member 'addMembers' in 'staffList', which is of non-class type 'stuffList ()()'
client.cc:30: error: request for member 'printProperties' in 'staffList', which is of non-class type 'stuffList ()()'
i m really confused please help me to understand this.
thank you in advance