Ok I'm back with another problem im having.. I have a vector of casual staffmembers.. Each time i create a casual staffmember they are added into a vector named thecasuals.. To return a casual staffmembers staffID a function is created:
staffmember::get_staffid();
I need to be able to enter a staffmembers ID number, and then search the vector for the correct staffmember and print the staff members details.. I have ATTEMPTED this as follows in a function in my 'company' class..:
company::staffIDsearch(int ID);
casstart = thecasuals.begin();
casend = thecasuals.end();
for (casstart; casstart < casend; casstart++)
{
if (thecasuals[casstart].get_staffid() == ID)
{
cout << thecasuals[cassstart].get_name(); << " " << thecasuals[casstart].wage();
}
}
}
i am getting errors all over the place and am not sure what to do.. I have received errors saying i need to define 'casstart' and 'casend' but im not sure what to put them as, eg, int, casual...
Plus im sure there are syntax errors in there as i cannot find much helpful info on vectors and i'm lost..
Any Help would be appreciated!!
Thanks..
Jay Jones