【发布时间】:2010-07-25 17:48:37
【问题描述】:
可能的重复:
Declaring pointers; asterisk on the left or right of the space between the type and name?
what is the difference between const int*, const int * const, int const *
我一直想知道:
float const &var
const float &var
其中哪一种是编写代码的正确方法? (包括上面的例子):
float const& var
float const &var
float const & var
还有指针:
float * var
float *var
float* var
我总是把特殊标记放在变量名之前,感觉最合乎逻辑。这是正确的方法吗?
【问题讨论】:
-
它。没有。问题。
-
重复:stackoverflow.com/questions/2660633/… 导致更多重复。
标签: c++ code-formatting