- 博客(3)
- 收藏
- 关注
原创 C++模板类链接错误:LNK2001, LNK2019
问题描述:做了一个模板类,类定义放在头文件TStack.h中,类实现放在TStack.cpp中。在主程序中实例化时,发生链接错误LNK2019。Stack floatStack(5);错误信息:error LNK2019: 无法解析的外部符号 "public: __thiscall Stack::Stack(int)" (??0?$Stack@M@@QAE@H@Z),原因分析
2016-06-04 14:47:24 3082 1
原创 缺少模板参数列表问题
//-----------------Stack.c---------------------template class Stack{public:Stack();~Stack();};//-----------------Stack.cpp---------------------#include "Stack.h"template Stac
2016-06-04 12:02:55 52750 2
原创 cout << string 编译错误
string s = "abc";cout 错误信息:error C2679: 二进制“原因分析:string类中没有重载“解决方法:cout c_str()
2016-06-04 11:27:42 768
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人