int* p;  // OO Style, Type emphasis
int *p;  // Procedural style, Expression emphasis
int * p; // Unconventional Style, No emphasis

A public coding style from Google:
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Pointer_and_Reference_Expressions
// These are fine, space preceding.
char *c;
const string &str;

// These are fine, space following.
char* c;    // but remember to do "char* c, *d, *e, ...;"!
const string& str;

char * c;  // Bad - spaces on both sides of *
const string & str;  // Bad - spaces on both sides of &

A discussion on stackoverflow:
What's your preferred pointer declaration style, and why?
http://stackoverflow.com/questions/377164/whats-your-preferred-pointer-declaration-style-and-why




-- IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium.  Thank you.

_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to