C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Map error on VC++

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Cheenu
Guest





PostPosted: Mon Nov 20, 2006 10:10 am    Post subject: Map error on VC++ Reply with 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.
Back to top
Jim Langston
Guest





PostPosted: Mon Nov 20, 2006 10:10 am    Post subject: Re: Map error on VC++ Reply with quote



"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





PostPosted: Mon Nov 20, 2006 10:11 am    Post subject: Re: Map error on VC++ Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.