coding style: type* variable or type *varible

Mike Stump mrs@apple.com
Tue Sep 13 19:27:00 GMT 2005


On Sep 13, 2005, at 12:23 PM, Rafael Espíndola wrote:
> I have seen both in gcc. I have found that "type* variable" is
> preferred in C++ code but I haven't found any guidelines for C code.

If you ask gcc, you find:

mrs $ grep 'int\* ' *.c | wc -l
        4
mrs $ grep 'int \*' *.c | wc -l
      369

pretty clear to me.



More information about the Gcc mailing list