Pointer Declaration
Pointer Declaration

To declare a pointer, here is the general form:

<dataType> * <variableName>; <dataType>* <variableName>; <dataType> *<variableName>; The * in the declaration can be placed in any of the above positions legally. Where you choose to place it is a matter of style. In my code, declarations look like this: int *aPtr, *bPtr; int *intPtr; char *lookAhead; I put the * next to the variableName as to not confuse which variable is a pointer. Personal Preference.


Main Page
Last Modified 31 October 2000