Quick C++ help needed.

notfred

Lifer
Feb 12, 2001
38,241
4
0
here's the line I'm having trouble with:

while(CurrentNode.GetNext() != 0){

CurrentNode is a pointer to an object. GetNext Returns a pointer to another object of the same class (or zero, if there are no more objects).

the error I get (Borland Builder 5) is: E2294 Structure required on left side of . or .*

I hope this is something dumb that I'm just forgetting.
 

blahblah99

Platinum Member
Oct 10, 2000
2,689
0
0
umm... if CurrentNode is a pointer to an object, dont you have to use CurrentNode->GetNext() ??
 

Ameesh

Lifer
Apr 3, 2001
23,686
1
0


<< umm... if CurrentNode is a pointer to an object, dont you have to use CurrentNode->GetNext() ?? >>



yep!