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.
There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!
"...The only real game I thank in the world is baseball..." --Babe Ruth
"Life is beautiful"-Don Corleone right before he died.
"The expert on anything was once a beginner" -Baseball poster I own.
Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.
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
hasafraggin shizigishin oppashigger...
(*myHead).Insert(pData);
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
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.
There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!
"...The only real game I thank in the world is baseball..." --Babe Ruth
"Life is beautiful"-Don Corleone right before he died.
"The expert on anything was once a beginner" -Baseball poster I own.
Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.
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.
There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!
"...The only real game I thank in the world is baseball..." --Babe Ruth
"Life is beautiful"-Don Corleone right before he died.
"The expert on anything was once a beginner" -Baseball poster I own.
Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.
Oh this is from a linked list.
There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!
"...The only real game I thank in the world is baseball..." --Babe Ruth
"Life is beautiful"-Don Corleone right before he died.
"The expert on anything was once a beginner" -Baseball poster I own.
Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.