求助(构造函数)
#include<iostream>using namespace std;
class cat
{
public:
cat();
~cat();
};
cat::cat()
{
cout<<"i love this game !" <<endl;
}cat::~cat()
{
}
int main()
{
cat a;
a.cat();
return 0;
}
报错:'function-style cast' : illegal as right side of '.' operator
是不是构造函数不能被调用?