Ive been given a coding standard to follow when coding my projects. It is not set in stone yet so I would like to get some 3rd party input (you guys) on some of the rules. Any suggestions are appreciated.
1. The dereference operator '*' and the address-of operator '&' should be directly connected to the type specifier. The rational of this is that, as an example, int* p; emphasizes type over syntax while int *p; emphasizes syntax over type. Although both forms are valid, the heavy emphasis on types in C++ suggests that int* p; is the preferable form.
I don't quite agree with this rule because when you concatinate declarations like this:
you are forced to put the operator by the variable instead of the type. Else, you would have to spread all the variables out on its own line:Code:int *a, *b, *c;
Code:int* a; int* b; int* c;
Whats your take on it. Discuss.