Game Development Community

A Little C++ Help?

by Bill Henderson · in Torque Game Engine · 01/25/2002 (3:59 pm) · 3 replies

I am looking through the console code for the torque engine, and I have come across many lines similar to the one below...

CollisionWorkingList* itr

...Is this a different syntax for a pointer, because I noticed how the asterisk follows the data type, and usually it would precede the implementation of the data type....

Any help would be great...

#1
01/25/2002 (5:21 pm)
well... I figured out what the asterix was all about.
Turns out that it is simply another way of having a pointer :P
#2
01/25/2002 (6:41 pm)
heh thats the only way i learned it :)
ryan
#3
01/26/2002 (3:02 am)
the itr probably stand for Itterator. Seeing the variable name before it, looks like it's an itterator for an STL (Standard Template Library) list.

and yes...
void* pPointer
is the same as
void *pPointer

This is one of the good things of hungarian notation (which they unfortionately don't use).
It would make clear what type of variable it is by looking at it's name.