菜鸟使用构造函数时的小问题
#include <iostream>//using std::cout;
using namespace std;
class cfx
{
public:
szcfx(int g,int k){cfxg=g;cfxk=k;}
//int zsx(){return cfxg*cfxk;}
private:
int cfxg;
int cfxk;
};
int main()
{
int x;
int y;
cout<<"g";
cin>>x;
cout<<"k";
cin>>y;
cfx cf(x,g);
//cf.szcfx;
//cout<<zsx<<"\n";
return 0;
}
//请问哪里错了?