D
drop669
Hi.
I have this piece of code:
=====================================
#include <map>
template <class T> class dict
{
private:
std::map<DWORD, T> m_d;
[ ... ]
void enum_keys_as_dwords (DWORD *out)
{
DWORD *o=out;
for (std::map<DWORD, T>::iterator it=m_d.begin(); it!=m_d.end(); it+
+)
{
*o=it->first;
o++;
};
};
};
=====================================
While compiling this in MinGW, it says:
=====================================
dict:91: error: expected `;' before "it"
=====================================
(line 91 is the line where "for (...)" is located).
I'm really don't know what to do. The problem is probably in using
type T. Where I mistaken?
I have this piece of code:
=====================================
#include <map>
template <class T> class dict
{
private:
std::map<DWORD, T> m_d;
[ ... ]
void enum_keys_as_dwords (DWORD *out)
{
DWORD *o=out;
for (std::map<DWORD, T>::iterator it=m_d.begin(); it!=m_d.end(); it+
+)
{
*o=it->first;
o++;
};
};
};
=====================================
While compiling this in MinGW, it says:
=====================================
dict:91: error: expected `;' before "it"
=====================================
(line 91 is the line where "for (...)" is located).
I'm really don't know what to do. The problem is probably in using
type T. Where I mistaken?