Originally posted by Firgeis
Thanks
for the help, still got some questions, in:
(objp->type == OBJ_SHIP); whats the -> for,? or is it a part of the name of the class/object/function
Umm. Not to be disrespectful, but you should get a decent book on C, or you'll be hopelessly lost wading through the 300K+ lines of code. Kernigan and Ritchie wrote the classic "The C Programming Language," and that's a good place to start -- there are other, more recent ones that are probably just as good.
C, and even more so, C++, does not have the friendliest syntax in the world, and making changes without understanding what's happening can be very dangerous (especially with pointer variables, like "objp" in your example).
As has been mentioned already, -> gives you access to the elements of a
pointer to a struct or class. It combines the dereference operator ("*") with the element-of operator ("."), so "(*objp).type" is essentially the same as "objp->type"