Created
October 7, 2012 06:30
-
-
Save dilijev/3847321 to your computer and use it in GitHub Desktop.
legal and illegal const expressions with pointers
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
int n = 42; | |
const int* const a = &n; | |
int const* const b = a; // same type as a | |
// const int const * c = b; // "error: duplicate const" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment