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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top