Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Pointer declaration syntax

Name: Anonymous 2006-03-06 10:27

void* ptr;
void *ptr;
void * ptr;

Since every compiler accepts every one of them, which one do you think is the most correct?
I go with void* ptr.

Name: Anonymous 2006-03-06 11:05

not quite, we're not talking about the * as the de-reference operator as we would in, for exemple *ptr = &variable;
in this case the * serves simply to mark the declaration as a pointer to a instead of a data type. makes more sense to me to put it right next to the data type.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List