暴走漫画带字骂人图片:C++高手来看

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/28 00:51:16
class A{
public:
A(const A& other);
};

A::A(const A& other)
{
cout<<"fdsa\n";
}

int main(int argc, char **argv){
A a;
A b(a);
}

为什么编译会出错:
t.cpp: In function `int main(int, char**)':
t.cpp:15: no matching function for call to `A::A()'
t.cpp:10: candidates are: A::A(const A&)

加个using namespace std;
main 要有个返回值,加个return 0;
...............................