由买买提看人间百态

topics

全部话题 - 话题: singleton2
(共0页)
n*******r
发帖数: 22
1
来自主题: JobHunting版 - C++ Singleton Template - 编译通不过
在Visual Studio上编译总是有错,哪位大侠能不能帮我看看是什么原因?
error LNK2019: unresolved external symbol "private: __thiscall
Singleton2::Singleton2(void)" (??0?$Singleton2@H@@AAE@XZ)
referenced in function "public: static class Singleton2 * __cdecl
Singleton2::GetInstance(void)" (?
GetInstance@$Singleton2@H@@SAPAV1@XZ)
// Singleton.h
template class Singleton2
{
private:
Singleton2(void);
~Singleton2(void);
Singleton2(const Singleton2&);
Singleton2& operator=(const Si... 阅读全帖
r*******m
发帖数: 109
2
来自主题: JobHunting版 - C++ Singleton Template - 编译通不过
because your default constructor is not defined. use this.
Singleton2(){};
(共0页)