Original Post
Hello! I am having some difficulties with STL map container. I get some weird errors in the following piece of code.
#include <map>
#include <vector>
template <class T> class CMemoryManager
{
// tMemoryPage structure
class tMemoryPage
{
CMemoryBlock <T> MemoryBlock; // CMemoryBlock for the page
std::vector <unsigned int> MagicVec; // Vector of magic numbers
std::vector <unsigned int> FreeVec; // Vector of free slots in the memory block
};
// ... some typedefs for STL
typedef std::map <string, tMemoryPage> ResourceMap;
typedef ResourceMap::value_type mapValue;
/* error C2146: syntax error : missing ';' before identifier 'mapValue' */
typedef ResourceMap::iterator mapItor;
// *** rest of the class *** //
};
Do you notice anything suspicious ? :) If so, I would be thankful if you help me. Thanks in advance!