Original Post
I''m having some trouble getting my manager template to work with the stl vectors. I''m getting errors in memory.h and new.h. Stuff like..
syntax error : ''constant''
c:\program files\microsoft visual studio\vc98\include\new(35) : error C2091: function returns function
error C2809: ''operator new'' has no formal parameters
error C2059: syntax error : ''constant''
error C2091: function returns function
error C2556: ''void *(__cdecl *__cdecl operator new(void))(unsigned int,const struct std::nothrow_t &)'' : overloaded function differs only by return type from ''void *(__cdecl *__cdecl op
I''m by no means an expert with templates or stl so my problem may be easy to spot..but I don''t know what it is.
Here''s the my declaration..
#include <vector>
using namespace std;
template class CTManager
{
typedef vector OBJECTVECTOR;
typedef OBJECTVECTOR::iterator ObjectVectItor;
public:
CTManager(void);
~CTManager(void);
int Add(const T p_T);
int Delete(const T p_T);
int Delete(int index);
int DeleteAll();
T Get(int index);
T Get(const T p_T);
int GetCount();
protected:
int error;
OBJECTVECTOR p_T;
};
Thanks
Paul