const限定符可以把一个对象转换成一个常量;
const int bufSize=512; //input buffer size
定义bufSize为常量并初始化为512.变量bufSize仍然是一个左值,但这个左值不可以修改,任何修改bufSize的尝试都会导致编译错误。
const std::string hi="hello!";//ok:initialized
const int i,j=0;//error:i is uninitialized const
const对象默认为文件的局部变量;