This question shows research effort; it is useful and clear
9
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.
有这个代码:
struct A {
int x;
void f() {}
};
struct B {
int y;
virtual void f() {}
};
A a = {2};
//B b = {3}; error: no matching constructor for initialization of 'B'
int main() {
return 0;
}