473,386 Members | 1,757 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' Set as variable

Hi all,

I want to use STL's Set as variable.
The function type :

set<int> get_set_child(set<int> set_parent) {
do something...
return set_child
}

Is the set_parent variable input as reference(pointer)? If the
set_parent input as value, can I use (set<int> * set_parent) as input?

Best regards,
Robert

Aug 17 '05 #1
1 1161
Robert wrote:
I want to use STL's Set as variable.
The function type :

set<int> get_set_child(set<int> set_parent) {
do something...
return set_child
}

Is the set_parent variable input as reference(pointer)?
No. Do you see any '&' or '*' in the declaration of the argument?
If the
set_parent input as value, can I use (set<int> * set_parent) as input?


Should be able to. Why don't you simply try instead of asking?

V
Aug 17 '05 #2

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

Similar topics

20
by: Hanzo | last post by:
I'm iterating over a vector of base class pointers and deleting those which meet a certain criteria...i'm using pretty text-book code for the particular delete/erasure (it's straight out of Myers'...
7
by: Shailesh Humbad | last post by:
I wrote a simple, but proprietary queue class that efficiently enqueues and dequeues arbitrary length byte arrays. I would like to replace it with an STL container if the performance overhead is...
8
by: Michael | last post by:
Don't shoot me down guys, I know the Standard says nothing of threads and all.... As i understand it the STL does not support multithreading, however I want to use the STL in a multithreaded...
11
by: Richard Thompson | last post by:
I've got a memory overwrite problem, and it looks as if a vector has been moved, even though I haven't inserted or deleted any elements in it. Is this possible? In other words, are there any...
47
by: mihai | last post by:
What does the standard say about those two? Is any assurance that the use of STL is thread safe? Have a nice day, Mihai.
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...
6
by: young_leaf | last post by:
Using STL how do I convert a variable to a binary string but with special case which for example BYTE x, i need only the first 3 bits of this byte, is that possible? to be more specific, from...
20
by: Dilip | last post by:
I understand the C++ standard does not talk about threading. My question here is directed more towards what happens when a STL container is used in a certain way. I'd appreciate any thoughts. I...
2
by: Mike Cain | last post by:
Two quick questions please: 1) How do I declare a STL string variable that I know in advance I want to hold 5,000 bytes? I'm using SGI STL with MS VS 6.0 C++ in case that matters. For example,...
48
by: Tony | last post by:
How much bloat does the STL produce? Is it a good design wrt code bloat? Do implementations vary much? Tony
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
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...
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
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.