报错:
错误 1 error LNK2019: 无法解析的外部符号 "public: __thiscall point::point(class point &)" (??0point@@QAE@AAV0@@Z),该符号在函数 _main 中被引用 classsample.obj
错误 2 fatal error LNK1120: 1 个无法解析的外部命令 D:\c++\test\classsample\Debug\classsample.exe 1
程序如下
// classsample.cpp : 定义控制台应用程序的入口点。
//#include "stdafx.h"
#include "iostream"
using namespace std;
//做一个类
class point{
public:
point(int xx=0){x=xx;};//构造函数
point(point& p);//拷贝构造函数
int getx(){return x;};private:
int x;
};
//主函数
void main(){
point a(1);//构造函数
point b(a);//拷贝构造函数
cout<<a.getx()<<endl;
    cout<<b.getx()<<endl;
}