Skip to content

Instantly share code, notes, and snippets.

@dilijev
Created October 7, 2012 06:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dilijev/3847321 to your computer and use it in GitHub Desktop.
Save dilijev/3847321 to your computer and use it in GitHub Desktop.
legal and illegal const expressions with pointers
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