Changes between Version 3 and Version 4 of const


Ignore:
Timestamp:
May 13, 2010, 4:47:48 PM (10 years ago)
Author:
andersk@mit.edu
Comment:

Add some examples to make clear that const int is equivalent to int const.

Legend:

Unmodified
Added
Removed
Modified
  • const

    v3 v4  
    33== Syntax review ==
    44
    5 ||`const int x;`||The value of the `int` cannot be changed.||
    6 ||`const int *p;`||The value of the `int` cannot be changed through this pointer.||
     5||`const int x;`[[br]]`int const x;`||The value of the `int` cannot be changed.||
     6||`const int *p;`[[br]]`int const *p;`||The value of the `int` cannot be changed through this pointer.||
    77||`int *const p;`||The value of the pointer cannot be changed.||
    88||`const int *const p;`||The value of the pointer cannot be changed, and the value of the `int` cannot be changed through this pointer.||