By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,950 Members | 989 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,950 IT Pros & Developers. It's quick & easy.

multimap problem in .NET

P: n/a
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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.