Skip to content

Instantly share code, notes, and snippets.

@fabiogaluppo
Last active January 25, 2016 17:56
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 fabiogaluppo/361c45bdfcaaff2f914d to your computer and use it in GitHub Desktop.
Save fabiogaluppo/361c45bdfcaaff2f914d to your computer and use it in GitHub Desktop.
const int y = 4;
auto y1 = y; //y1 is int, not const int
y1 = 16;
const auto y2 = y; //const int
//y2 = 16; //compilation will fail, because y2 is read-only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment