#include"iostream"
using namespace std;
class A
{
int a;
int b;
int c;
public:
A()
{
a=2;
}
A(int e)
{
b=5;
}
A(double f)
{
c=21;
}
void display()
{
cout< cout< cout<
};
int main()
{
A e(2);
e.display();
system("pause");
return 0;
}
你的三个构造函数的参数类型都一样,怎么可能会识别的了,好好看看函数重载的概念