473,386 Members | 1,606 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,386 software developers and data experts.

STL: Map of maps possible, but no multi-map of maps? Workarounds?

It's possible to do this:

map<double, map <string, int> > foo;

but not this or any other nested variant using multimap:

multimap<double, map <string, int> > foo;

Any known (or unknown) workarounds?

Thanks
Marcus

Dec 9 '05 #1
2 4216

Marcus wrote:
It's possible to do this:

map<double, map <string, int> > foo;

but not this or any other nested variant using multimap:

multimap<double, map <string, int> > foo;


Works with comeau online 4.3.3, also with g++ 3.4.2

Dec 9 '05 #2
hmmm... you're right, i must have a bug somewhere. glad to know it
works.

thanks for checking that.

Dec 9 '05 #3

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

Similar topics

7
by: Karen | last post by:
Hi, I have one constant variable and want to use it in two files. I put it in the header file and then include the header file. The compiler always say "error C2370: 'arraysize' : redefinition;...
22
by: Claudio Jolowicz | last post by:
Is it possible to store unique objects in an STL container? Suppose an object of class C is unique: class C { public: C() {} ~C() {} private:
3
by: Mark P | last post by:
I'm working with a std::multiset and I want to efficiently select a (continuous) range of elements in the set. What I know is that the desired range is exactly those elements which compare equal...
1
by: Kamil | last post by:
I want to sum elements of a multi-dimensional vector, across each vector, or across each dimension... this is my old code: #define v_ldouble vector<ldouble> #define vv_ldouble...
3
by: Sandy | last post by:
Hi, I am reading a book of C++ templates, it says the template code must be available in order to initialize it for a particular type. So my doubt is: What about STL source code, is it shipped...
12
by: Rasika WIJAYARATNE | last post by:
I am new to VCPP and was wondering about the unmanaged part of it: 1. Does MFC include all the functions/functionality of the STL so it can be used standalone? 2. Is the MFC mainly used for...
12
by: Herby | last post by:
Hi, I am currently reviewing what is required to convert a current MFC, COM server application into a .NET application. The objective is to compile ultimately to clr/safe. So we are seeking a...
8
by: Generic Usenet Account | last post by:
I have a need for a set operation (actually multi-set operation) on sorted structures that is not in the STL library. I call it the set_retain operation. It's kinda similar to the...
49
by: Alex Vinokur | last post by:
Are there any restrictions/problems for use of C++ STL in development in embedded systems? In particular: * Does STL require too much space/memory? * Is 'implementation of STL...
2
by: jfwfmt | last post by:
I'm trying to get the class multi to store a series of function/argument pairs. The functions are of the form: string funcA (const string argA) I thought that I had all the signatures...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.