extern int const i1 = 42;
int const i2 = 42;
const int i3 = 42;
const extern int i4 = 42;
const extern int i4 = 42;
Some people such as authors David Vandevoorde and Nicolai M. Josuttis prefer the int const' versions of the above declarations.
References:
C++ Templates
http://codecraft.pool-room.com/Cpp/const-correctness-3.html

No comments:
Post a Comment