Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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