Hi,
set<int> s1, s2, s3;
....
set_intersection(s1.begin(), s1.end(), s2.begin(), s2.end(), ???);
What do I put at place of ??? to get in s3 the intersection between s1
and s2?
Thanks in advance,
Giulio 4 1704
Giulio Veronesi wrote: Hi,
set<int> s1, s2, s3; ... set_intersection(s1.begin(), s1.end(), s2.begin(), s2.end(), ???);
What do I put at place of ??? to get in s3 the intersection between s1 and s2?
Thanks in advance, Giulio
For instance: std::inserter( s3, s3.begin() )
Best
Kai-Uwe Bux
You are very smart... but that page does not answer to my question.
Anyway, somebody else gave me the solution yet.
Thanks
Giulio
Giulio Veronesi wrote: You are very smart... but that page does not answer to my question. Anyway, somebody else gave me the solution yet.
The point is:
You have the worlds knowledge at your fingertips in the form of Web-sites.
There is even a search engine that can provide you with possible answers to your
questions and is very good in doing so. Especially if it comes to code examples
on how to use some features in C++. You just need to use it. Try it, it works
faster then typing a question in your newsreader and sending it to a group.
--
Karl Heinz Buchegger kb******@gascad.at This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Ryan R. Rosario |
last post by:
Hello -
I am working on a scheduling application that has many "rules" for
scheduling people. I throw each person into the set that corresponds
to 2 teams. Then I split this large group (of...
|
by: pembed2003 |
last post by:
Hi All,
Does C++/STL have hashtable where I can do stuff like:
Hashtable h<int>;
h.store("one",1);
h.store("two",2);
and then later retrieve them like:
|
by: Davy |
last post by:
Hi all,
I want to use set_intersection, and the compiler passed with a warning.
But the program hang on when it enter set_intersection(), why?
And how can I insert element to set by insert();...
|
by: harris.pc |
last post by:
Hi,
Can someone please explain to me WHY the standard does not allow the
input range and the output range to overlap for set_intersection?
I can't see why I can't do this (note sorted vectors,...
|
by: Generic Usenet Account |
last post by:
Hi,
I have some questions regarding STL set intersection. As per the STL
reference manual (http://www.hpl.hp.com/techreports/95/HPL-95-11.pdf),
the signatures of the set_intersection...
|
by: tutufan |
last post by:
Hi,
I've been trying to create a set of abstract set operations, so that I
could do something like this
set1 = union(set2, set3);
or even
set1 = set2 | set3;
|
by: Yuri CHUANG |
last post by:
This is a example from a textbook,but there are some strange error that
I don't understand.Could anyone give me some help to realize the
operations on set.Thank you very much:-)
(I compile it with...
|
by: Moohoo |
last post by:
I have two sorted containers, and I wish to know if any items from one
container exist in the second container. Is there anything in the
standard library to do this?
Thanks
|
by: PengYu.UT |
last post by:
Hi,
I have the following definition for a closed-open interval (see
http://mathworld.wolfram.com/Interval.html). I have two sets of
intervals, say A and B. Any two intervals in A (or B) have no...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
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...
|
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,...
|
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,...
|
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: 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...
| |