STL' Set as variable

R

Robert

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
 
V

Victor Bazarov

Robert said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top