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

Will this class compile, and what does the `const` on `size()` mean?

struct Buf { int n = 0; int size() const { return n; } void grow() const { ++n; } // line X };