|
-
May 3rd, 2003, 11:00 AM
#1
Linked List Questions
Evening all,
I am developing a linked list program, im not using the linked list template with the STL.
Im writing my own code rather than relying upon the built in functionality.
I have a class list and one of my operation's
Code:
void list::Display( void ) // Display list details
{
ToFirst(); // Move to first node in list
while ( !AtLast() )
{
RetrieveInfo(); // Display info for current node
AdvanceNext(); // Advance to next node in list
}
}
ToFirst, RetrieveInfo (see below) and AdvanceNext are all operations within the same class. I don't think this operation (Display) is working as it should, however I know the operation RetrieveInfo works fine as I have tested it by calling it in my main program.
What I would like to ask is am I calling these functions correctly? I presumed because they were all in the same class I wouldn't need to put something like
Code:
list::RetrieveInfo();
RetrieveInfo is a operation which simply outputs the values of that element in the list
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|