From: Daniel on
Here is the template definition:

#include <string>
#include <map>

template <typename HNDTYPE>

class resmap
{

public:
struct resnode
{
bool mark;
HNDTYPE handle;
};

typedef std::map<std::string, resnode> maptype;
....
and here is the problem line:

template <typename HNDTYPE>bool resmap<HNDTYPE>::
unmark(std::string const &s)
{
maptype::iterator iter = nds.find(s);

the compiler shows this error:
maptest.cpp:45: error: expected `;' before "iter"

{ A short answer: add "typename" before "maptype::iterator". -mod/sk }


--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]