 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Cheenu Guest
|
Posted: Mon Nov 20, 2006 10:10 am Post subject: Map error on VC++ |
|
|
HI,
I get this following error while compiling my project on VC++ 6.0/
Windows XP.
" map: use of class template requires template argument list "
I installed the service pack6 too, but it doesn't solve the problem.
Can anyone give me suggestions?
Thanks,
Cheenu. |
|
| Back to top |
|
 |
Jim Langston Guest
|
Posted: Mon Nov 20, 2006 10:10 am Post subject: Re: Map error on VC++ |
|
|
"Cheenu" <cheenuv (AT) gmail (DOT) com> wrote in message
news:1164009774.359715.262740 (AT) m7g2000cwm (DOT) googlegroups.com...
| Quote: | HI,
I get this following error while compiling my project on VC++ 6.0/
Windows XP.
" map: use of class template requires template argument list "
I installed the service pack6 too, but it doesn't solve the problem.
Can anyone give me suggestions?
Thanks,
Cheenu.
|
Show the code you're trying to compile. Most likely you are doing something
wrong. A map should look something like this:
#include <map>
int main()
{
std::map<int, std::string> MyMap;
} |
|
| Back to top |
|
 |
Kirit Sælensminde Guest
|
Posted: Mon Nov 20, 2006 10:11 am Post subject: Re: Map error on VC++ |
|
|
Cheenu wrote:
| Quote: | HI,
I get this following error while compiling my project on VC++ 6.0/
Windows XP.
" map: use of class template requires template argument list "
I installed the service pack6 too, but it doesn't solve the problem.
Can anyone give me suggestions?
|
There are some bugs (maybe fixed in that SP) of std::map on MSVC6, but
I don't think this was ever one of them.
Looks like you're doing something like this:
std::map myVar;
Rather than this:
std::map< int, std::string > myVar;
You have to supply the two types, key and value.
K |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|