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 13:20

>>3
There is no such thing as "simply to mark" in an algebra. * is an operator that changed the variable declaration following it into a pointer declaration.

For those who like to put the star next to the type, consider what kind of variables this declares:int* foo, bar

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