Tutorial by Examples

const int a = 0; /* This variable is "unmodifiable", the compiler should throw an error when this variable is changed */ int b = 0; /* This variable is modifiable */ b += 10; /* Changes the value of 'b' */ a += 10; /* Throws a compiler error */ The const qualif...
The volatile keyword tells the compiler that the value of the variable may change at any time as a result of external conditions, not only as a result of program control flow. The compiler will not optimize anything that has to do with the volatile variable. volatile int foo; /* Different ways to ...

Page 1 of 1