Created
April 29, 2014 08:38
-
-
Save samueljackson92/11394168 to your computer and use it in GitHub Desktop.
Constants in C++
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int* p; // the thing pointed to is const, you can change the value of p | |
int const *q; // same as p | |
int * const r; // the pointer is const, but the thing pointed to can change value | |
int const * const s; // the pointer is const and the thing pointed to is const |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment