473,407 Members | 2,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

multimap problem in .NET

with the following chunk of code:

#include <map>

using namespace std;

void MultiMapTest()
{
std::multimap<const int, char *> myMultiMap;
}

I get the following errors:

------ Build started: Project: TrpPlugIn, Configuration: Debug Win32 ------

Compiling...
MultiMapTest.cpp
c:\Program Files\Microsoft Visual Studio .NET 2003a\Vc7\include\xmemory(87) : error C2535: 'std::allocator<_Ty>::pointer std::allocator<_Ty>::address(std::allocator<_Ty>:: reference) const' : member function already defined or declared
with
[
_Ty=const std::_Tree<std::_Tmap_traits<const int,char *,std::less<const int>,std::allocator<std::pair<const int,char *>>,true>>::key_type
]
c:\Program Files\Microsoft Visual Studio .NET 2003a\Vc7\include\xmemory(81) : see declaration of 'std::allocator<_Ty>::address'
with
[
_Ty=const std::_Tree<std::_Tmap_traits<const int,char *,std::less<const int>,std::allocator<std::pair<const int,char *>>,true>>::key_type
]
c:\Program Files\Microsoft Visual Studio .NET 2003a\Vc7\include\xtree(122) : see reference to class template instantiation 'std::allocator<_Ty>' being compiled
with
[
_Ty=const std::_Tree<std::_Tmap_traits<const int,char *,std::less<const int>,std::allocator<std::pair<const int,char *>>,true>>::key_type
]
c:\Program Files\Microsoft Visual Studio .NET 2003a\Vc7\include\map(155) : see reference to class template instantiation 'std::_Tree<_Traits>' being compiled
with
[
_Traits=std::_Tmap_traits<const int,char *,std::less<const int>,std::allocator<std::pair<const int,char *>>,true>
]
c:\SbirsWorkbench\Build.1.15.NET\as\AnalysisWorkbe nch\WorkbenchClient\TrpPlugin\MultiMapTest.cpp(9) : see reference to class template instantiation 'std::multimap<_Kty,_Ty,_Pr,_Alloc>' being compiled
with
[
_Kty=const int,
_Ty=char *,
_Pr=std::less<const int>,
_Alloc=std::allocator<std::pair<const int,char *>>
]

Build log was saved at "file://c:\SbirsWorkbench\Build.1.15.NET\as\AnalysisWorkbe nch\WorkbenchClient\TrpPlugin\Debug\BuildLog.htm"
TrpPlugIn - 1 error(s), 0 warning(s)
---------------------- Done ----------------------

Build: 0 succeeded, 1 failed, 0 skipped
This works in 6.0

Any ideas out there?

Thanks for any help.
Nov 22 '05 #1
0 1282

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

Similar topics

12
by: Tanguy Fautré | last post by:
Hello, does std::multimap make any guarantee about the insertion order? for example: int main() { std::multimap<int, int> Map;
9
by: Dennis Jones | last post by:
Hi, Is there a way to iterate through a multimap in such a way as to encounter only the unique keys? In other words, since a multimap allows duplicate keys, I would like to iterate through the...
3
by: He Shiming | last post by:
Hi Folks, Happy holidays! I have a question regarding STL multimap. Basically, the current multimap<int,int> look like this: key=>value 1=>10, 1=>20, 1=>30,
3
by: Przemek | last post by:
All, what is the efficient way to find all distinct keys in a multimap. I use the code template<class T1, class T2> set<T1> GetDistinctKeys(multimap<T1, T2> nMap) { T1 temp; multimap<T1,...
1
by: placid | last post by:
Hi all, i was just wondering if i have a class class A {}; then i want to use a multimap like, multimap<string,A*> as; //can i have a pointer to a A object ? A* aa = new A();
4
by: Nick Keighley | last post by:
Hi, I've checked out various documentation for multimap but can't find anywhere it explicitly stated that insert() invalidates multimap iterators. consider this pseudo code:- int...
4
by: sks | last post by:
I have a question regarding std::multimap/iterators. At the SGI website, it says "Erasing an element from a multimap also does not invalidate any iterators, except, of course, for iterators that...
1
by: Saile | last post by:
I want to give an array the values from the specific multimap's key's values. multimap<string,int> mymultimap; multimap<string,int>::iterator it;...
1
by: ambarish.mitra | last post by:
Hi all, I have a multimap, where key is an int and the value is a class. I can insert into the multimap, but finding it difficult to retrieve the value when keys match. I can do this with...
20
by: puzzlecracker | last post by:
I am using while loop for that but I am sure you can do it quicker and more syntactically clear with copy function. Here is what I do and would like to if someone has a cleaner solution: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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,...
0
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...
0
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...

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.