GraemeW
April 17th, 2003, 05:00 AM
Hi All,
Im using Borland C++ Builder 6, I have been writting a small program which utilizes linked lists to store information.
I need to print information for each node then move to the next node and print that information etc. I set a up a while loop which tests that it isn't the end of the list, if not it prints the info for the current node and moves to the next.
Until I added this last piece of code the program was working fine but now I get a:
[Linker Error] Unresolved external 'list::DisplayFleet()' referenced from C:\....MAIN.OBJ
ToFirst(); // Move to first node in list
while ( !AtLast() )
{
RetrieveInfo(); // Display info for current node
AdvanceNext(); // Advance to next node in list
}
The error must be in this piece of code, this code exists within the the cpp file of the class list. Basically I don't know how to call functions within functions of a class. (hope you understand what I mean).
In my main file I would do it like:
list.DisplayFleet(), but say when I move to this operation within my class and then want to call other operations on the same object, how would I do that? Obviously I can't type list.RetrieveInfo() because the operation won't know what "list" is.
Any help greatly appreciated
Im using Borland C++ Builder 6, I have been writting a small program which utilizes linked lists to store information.
I need to print information for each node then move to the next node and print that information etc. I set a up a while loop which tests that it isn't the end of the list, if not it prints the info for the current node and moves to the next.
Until I added this last piece of code the program was working fine but now I get a:
[Linker Error] Unresolved external 'list::DisplayFleet()' referenced from C:\....MAIN.OBJ
ToFirst(); // Move to first node in list
while ( !AtLast() )
{
RetrieveInfo(); // Display info for current node
AdvanceNext(); // Advance to next node in list
}
The error must be in this piece of code, this code exists within the the cpp file of the class list. Basically I don't know how to call functions within functions of a class. (hope you understand what I mean).
In my main file I would do it like:
list.DisplayFleet(), but say when I move to this operation within my class and then want to call other operations on the same object, how would I do that? Obviously I can't type list.RetrieveInfo() because the operation won't know what "list" is.
Any help greatly appreciated