Member Initializer List Order
What does this print?
#include <iostream>
class Widget {
int a;
int b;
public:
Widget() : b(1), a(b + 1) {
std::cout << a << b;
}
};
int main() { Widget w; }
Sign in to answer questions and track your progress
Sign In