for a newbie.....
myHead->Insert(pData);
I know there's another way to write this, since I am a newbie this is confusing me, please help.
for a newbie.....
myHead->Insert(pData);
I know there's another way to write this, since I am a newbie this is confusing me, please help.
hmmm...
myHead is an instance of a user defined type... in this case a pointer to it.
-> dereferences it, allowing correct access to it's data members [and/or member functions if it was a class, which is this case].
pData could again be another user-defined type or any other variable. judging by it's 'p' prefix one would assume it was a pointer. but without more code we can only say so much.
hth
(*myHead).Insert(pData);
insert is a function defined by Sam's linked list code. It inserts a node into a linked list with head myhead.
oh you have this book, I think that his example for a link list is too long for a newbie is too hard to follow, I am planning to read another one online and then maybe come back and try to figure the one in the book out.
I didn't really like his section on linked lists either.
P.S. When you get to streams, message me with your opinion on that because I did not like it either.
Thanks man, even though this book is good and it can be very through at times it gets ahead of itself or it gives a really long program to explain a topic which could be explained in a simpler way making it more confusing.
Oh this is from a linked list.