[Fwd] c/c++关键字

| Monday, April 13, 2009
惯例是双下划线开头或者单下划线开头跟大写字母的保留给编译器实现。
单下划线跟非大写字母及下划线的保留给标准库的实现用。

前者比如 __declspec,__thread,__builtin_const_p
后者比如 _mkdir,_strupr, _strdup


http://www.newsmth.net/bbstcon.php?board=LinuxDev&gid=228851

也就是说 我们有可能可以用单下划线 用双下划线反而有问题 -- bad coding style :(

0 comments:

Post a Comment

Random Posts

Powered by Stuff-a-Blog