The following is based on the code that I posted on this thread. Aside from the obvious bugs, I get the following compilation errors? Any idea why?
The odd thing is that this only occurs for the template class. If I add another non template class to the same .h and .cpp file of the template class and try to instantiate just the non template class, no error is generated.
Scenario A:
I get the compilation error " error C2659: '=' : overloaded function as left operand " for the following code:
StdVector<int> a();
StdVector<int> b();
a = b;
Scenario B:
I get the compilation error " error C2664: '__thiscall StdVector::StdVector(const class StdVector &)' : cannot convert parameter 1 from 'class StdVector (__cdecl *)(void)' to 'const class StdVector &' " for the following code:
StdVector<int> a();
StdVector<int> b(a);
Scenario C:
I get the compilation error "error LNK2001: unresolved external symbol "public: __thiscall StdVector::~StdVector(void)" (??1?$StdVector@H@@QAE@XZ) " for the following code:
StdVector<int> a;