lnk2019无法解析的外部命令"public:__thiscall" (一元运算符重载)
来源:互联网 发布:阳光房顶棚防水 知乎 编辑:程序博客网 时间:2024/05/28 11:48
#include <iostream>using namespace std;// "-"的重载//“++”的重载//重载方式1:友元函数的重载 2:成员函数的重载class Coordinate{public:Coordinate(int x , int y){mx = x;my = y;};~Coordinate(){};Coordinate& operator-(){ mx = -mx; my = -my; return *this;}//friend Coordinate& operator-(Coordinate& floor);int mx;int my;};int main(void){Coordinate coor(2, 5);-coor;//coor.operator-();cout << coor.mx <<"\n"<< coor.my << endl;system("pause");return 0;}
一元操作符重载
析构函数忘了添加 {}
报错 LNK2019
阅读全文
0 0
- lnk2019无法解析的外部命令"public:__thiscall" (一元运算符重载)
- error LNK2019: 无法解析的外部符号 public: __thiscall
- Error: LNK2019 无法解析的外部符号 public __thiscall
- error LNK2019: 无法解析的外部符号 "public: void __thiscall
- error LNK2019: 无法解析的外部符号 "public: int __thiscall
- VC++常见错误原因解析--error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC++常见错误原因解析--error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC++常见错误原因解析--error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC++常见错误原因解析--error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC++常见错误原因解析--error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC++常见错误原因解析--error LNK2019: 无法解析的外部符号 "public: void __thiscall
- obj : error LNK2019: 无法解析的外部符号 "public: __thiscall B::B(void)" (??0B@@QAE@XZ),该符
- 错误4error LNK2019: 无法解析的外部符号 "public: __thiscall CRobotProvider::~CRobotProvider(void)" (??1CRobotP
- QT :LNK2019: 无法解析的外部符号 public: class QImage & __thiscall QImage::operator=(class QImage &&)"
- VC++常规错误之一:error LNK2019: 无法解析的外部符号 "public: void __thiscall
- error LNK2019: 无法解析的外部符号 "public: virtual __thiscall oracle::occi::SQLException
- VC++常规错误之一:error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC++常规错误之一:error LNK2019: 无法解析的外部符号 "public: void __thiscall
- GUI键盘事件
- sql函数
- 在Servlet中获取Web路径和文件真实路径
- ZZULIOJ 1875 蛤玮的财宝【最大费用流】
- JavaScript中常用的全局方法
- lnk2019无法解析的外部命令"public:__thiscall" (一元运算符重载)
- VS2015和opencv2.4.13的配置
- 命令源码解析
- pynlpir.LicenseError: Your license appears to have expired. Try running "pynlpir update".
- Eclipse快捷键
- 邮件客户端(接dovecot)
- 小知识
- 事物
- java 选择排序