STL' Set as variable

Discussion in 'C++' started by Robert, Aug 17, 2005.

  1. Robert

    Robert Guest

    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
     
    Robert, Aug 17, 2005
    #1
    1. Advertisements

  2. 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
     
    Victor Bazarov, Aug 17, 2005
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Neo Geshel
    Replies:
    6
    Views:
    4,551
    Cerebrus
    Mar 23, 2006
  2. =?Utf-8?B?TmV3YmllRGV2?=

    Object variable or With Block variable not set error

    =?Utf-8?B?TmV3YmllRGV2?=, Apr 26, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    672
    =?Utf-8?B?TmV3YmllRGV2?=
    Apr 26, 2006
  3. David C
    Replies:
    0
    Views:
    698
    David C
    Oct 9, 2007
  4. soofimra
    Replies:
    0
    Views:
    547
    soofimra
    May 21, 2008
  5. Kiyomi
    Replies:
    0
    Views:
    368
    Kiyomi
    Aug 11, 2006
  6. Replies:
    6
    Views:
    287
  7. Tony
    Replies:
    2
    Views:
    263
    Tad McClellan
    Apr 21, 2005
  8. J.Cottingim

    set Bad variable type - SNMP::Util set

    J.Cottingim, Jul 3, 2007, in forum: Perl Misc
    Replies:
    0
    Views:
    259
    J.Cottingim
    Jul 3, 2007
Loading...