473,503 Members | 3,085 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.

Nov 20 '06 #1
4 2028

Cheenu wrote:
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

Nov 20 '06 #2
"Cheenu" <ch*****@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
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::stringMyMap;
}
Nov 20 '06 #3
Cheenu wrote:
" 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?
I suggest to always check your code before installing packs or patches. In
the majority of cases the error is in the code you wrote, not in the
compiler or the operating system.

--
Salu2
Nov 20 '06 #4
Geo

Cheenu wrote:
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.
There is a bug in your code at line 42.

Nov 20 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1361
by: R Tamilarasan | last post by:
Curiosity made me to install VC - 7 (.net) in my machine which had VC - 6 already installed. I tried to compile my workspace in VC - 7 but failed due to several compile time errors. ok no...
1
1551
by: Paljo | last post by:
Trying to compile VC++ 6 project in VC++ 7 and getting a compiling error, error C2955: '_com_ptr_t' : use of class template requires template argument list Any thoughts? Thanks
2
5715
by: Qiao Yun | last post by:
I used vc++.net (visual studio .net ) to open a project which can work well in vc++6.0. I succeeded in compiling the project in vc++.net in release mode . But when I tried to compile the project...
0
6569
by: Herman Jones | last post by:
I'm getting the following error when I build a Class Library project: Embedding manifest... Project : error PRJ0002 : Error result 1 returned from 'C:\WINDOWS\system32\cmd.exe'. It happens with...
2
5300
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
9
4737
by: fcvcnet | last post by:
Hi, I write a class class CSegment { public: CSegment(void); public: ~CSegment(void); public: CArray< CList< CPoint, CPoint& >, CList< CPoint, CPoint& >& m_curve;
12
2537
by: Premal | last post by:
Hi, I tried to make delete operator private for my class. Strangely it is giving me error if I compile that code in VC++.NET. But it compiles successfully on VC++6.o. Can anybody give me inputs...
1
5113
by: misu101 | last post by:
Hi, I have a VS 6 project and I am trying to compile it using VS 2005. My program has the atlbase.h include which seems to trigger the errors. It used to compile OK using VS 6. The include...
2
14883
by: yalbizu | last post by:
#include <iostream> #include <string> #include <fstream> #include <iomanip> using namespace std; const int NO_OF_STUDENTS=20; struct studentType { string studentFName; string studentLName;
7
8426
by: Norman Diamond | last post by:
A project depends on VC runtime from Visual Studio 2005 SP1, and DotNet Framework 2. Options are set in the setup project properties, so if these two dependencies are not already installed then...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7291
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7012
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5598
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.