Monster MonsterDB::*find(const std::string& name){
for (MonsterDBNode *p = first; p; p = p->next) //C2065 on 'first'
{
//stuff
}
}
I receive a C2065 Undeclared Identifier on the 'first', which is a node in a linked list. Is it my first time working with this type of function, what do you call them? Pointerfunctions?
Anyways, i have the exact same for loop in a "non-pointerfunction" and it works. I just simply cant figure out what is wrong, reading up on C2065 its about missing includes, spelling and so on, which i have no errors on here.
I am not able to change the function or the arguments since its part of a course, and find that type of functions in my book, and since i don't know the specific name for them i cant look them up.