Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyC++const correctnessSingle-choice MCQ

Why does the second line fail to compile?

struct Counter { int n = 0; int get() { return n; } }; void show(const Counter& c) { c.get(); }