Return an object from an ADT list
Posted on 2005-03-24
I have a linked list where I would like to store class objects within it. I have a function called getStudentByStudentNumber which accepts a string parameter and loops through the list and stops if it finds the number in a property of the object. I'm having trouble with it, and here are the errors I'm getting...
C:\Project1\studentactionlist.cpp In member function `StudentActionList::StudentNode* StudentActionList::getStudentByStudentNumber(char*)':
19 C:\Project1\studentactionlist.cpp syntax error before `->' token
29 C:\Project1\studentactionlist.cpp cannot convert `student' to ` StudentActionList::StudentNode*' in return
I'll list the objects individually in each comment...