Home Forums Programming Beginning C++ Reply To: Beginning C++


@ peter_b

const int a =10; (okay)

a=5; (compiler error on the reassign because variable is const)

so lets say-

int main()
int a = 10;

a = 5;(wont this be a compiler error s well??)

printf("value of a = %d",a);


wat exactly is the const use for??