Create Pointer question

Hello,

1]
what is the difference of

int* a; and int *a; ?

also

2]
int *p;
p=new int;

is the same as

int *p=new int;

?
the same
1) There's no difference. It's a matter of style. I prefer int* a; because a's type is pointer to int (int*). Notice if you say int* a, b;, b will not be a pointer, but an int. But you shouldn't declare these on the same line anyway.
Nice, i will keep them in different lines. Thanks beginning and filipe!
Topic archived. No new replies allowed.