在学习c++是报了这个错:
Undefined symbols for architecture x86_64:
"StackMy<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::~StackMy()", referenced from:
_main in main.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
最后查证是因为头文件中自定义了析构函数,但没有实现这个析构函数导致的报错,在此记录一下