I'm trying to get my thought around pointers, now I have a very easy question. When defining a pointer does: int* p or int *p both result in a pointer?
They both mean the same thing. It might be a matter of debate as to which is the preferred style.
However, consider this: int* p, q;
This means the same as
1 2
int *p;
int q;
Thus it may be better to keep the * together with the variable name, or else one might be misled into thinking 'int*' means everything which follows is a pointer, which is not the case.
whaat!? thats moral support ideas man, beginners are most likley to give up unnecessarily when it comes to pointers, i know the teaching method, telling him he will get it will keep him persistent, and your comment is no better, infact, its worse :P