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

C pointer variables

Name: Anonymous 2009-06-15 12:13

Which is the better way to write them?


char* timmy = "hello\n";

or

char *timmy = "hello\n";

Name: Anonymous 2009-06-15 20:37

I've always used char*
the idea being that the * being attached to the type name (char) has much stronger human semantics than if the * was attached to the variable name.
char* foo;
tells me that foo is a pointer-to-char, for example.

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