473,657 Members | 2,678 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 2041

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.goog legroups.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::stringMyMa p;
}
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
1377
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 problems. So I tried to revert back and uninstalled VC - 7 and compiled my workspace in VC - 6. It gave a linker error that "mfc71d.lib" is not found.
1
1562
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
5731
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 in debug mode, the following errors happened: d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(29): error C2365: 'new' : redefinition; previous definition was a 'member function' d:\Program Files\Microsoft Visual Studio...
0
6603
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 every the of C++ project I try to build. Not just Class Libraries, but a plain Windows Form Application as well. I've tried creating new projects with nothing but shell built by the Wizard, but I still get the error.
2
5317
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: 1>make_buildinfo.obj : error LNK2019: unresolved external symbol __imp__RegQueryValueExA@24 referenced in function _make_buildinfo2 Ask on python-list@python.org . - Josiah
9
4750
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
2557
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 about it. I wanted that on my class delete should not work. Object pointer should be deleted using my function only which is taking care of reference count for particular class. Thanx in advance for your inputs.
1
5119
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 path is: C:/Program Files/Microsoft Visual Studio 8/VC/include;C:/Program Files/Microsoft Visual Studio 8/VC/atlmfc/include;C:/Program Files/Microsof t Visual Studio 8/SDK/v2.0/include;C:/Program Files/Microsoft Visual Studio...
2
14894
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
8441
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 this installer will install them. But what about the situation where VC runtime has already been installed? In fact it's been installed twice. Although the project was built on a Windows XP system with Visual Studio 2005 SP1 and the results were...
0
8403
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8316
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8833
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8610
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7345
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6174
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5636
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4168
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4327
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.