'const' 表示那個是不變數:
e.g. const int x=10; // x=10 all the time in the function, changes will lead to errors
x=9; // this is an error
另一方面,你也可以用在set functions:
e.g. void function1(const int y) { // y will be the value put into when the function is called and should not be changed in the function.
y=8; // this is an error
}
........
function1(7); //y=7 in the function.