没有合适的默认构造函数可用

#include " stdafx.h "
#include
< iostream >
using namespace std;

class A ... {
public:
staticvoidOutOK()...{
cout
<<"Aok"<<endl;
}

}
;

class B ... {
public:
B()
...{
cout
<<"constructB"<<endl;
}

B(
inti)...{
cout
<<"constructBwithint"<<endl;
}

staticvoidOutOK()...{
cout
<<"Bok"<<endl;
}

}
;

class C ... {
public:
C(
inti)...{
cout
<<"constructCwithint"<<endl;
}

staticvoidOutOK()...{
cout
<<"Cok"<<endl;
}

}
;

int main() ... {
Aa;
a.OutOK();

Bb;
b.OutOK();
Bbint(
2);
bint.OutOK();

Cc;
//errorC2512:“C”:没有合适的默认构造函数可用
c.OutOK();

return0;
}

你可能感兴趣的:(C++,c,C#)