Splitting templated C++ classes into .hpp/.cpp files--is it possible?

前端 未结 16 885
被撕碎了的回忆
被撕碎了的回忆 2020-11-22 17:27

I am getting errors trying to compile a C++ template class which is split between a .hpp and .cpp file:

$ g++ -c -o main.o main.cpp         


        
16条回答
  •  抹茶落季
    2020-11-22 17:51

    I am working with Visual studio 2010, if you would like to split your files to .h and .cpp, include your cpp header at the end of the .h file

提交回复
热议问题