[Solved] how I can compile templates c ++ 11, I can c ++ 14


Remove #include "ar.cpp" from main. You’re defining insert two times.

There is no difference between the relevant rules in C++11 and C++14. You did something different between your test runs that has nothing to do with the language version.

I also recommend not calling it .cpp. Conventionally, nothing you include should be called .cpp. Since you need to put template definitions in a header somewhere, people typically either name such headers either .hpp or something like .ipp to make them stand out. But .cpp is just confusing — indeed, it appears to have led you straight into this problem.

11

solved how I can compile templates c ++ 11, I can c ++ 14