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. Advertising

  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. Advertising

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. Allan Bruce

    To STL or not to STL

    Allan Bruce, Oct 16, 2003, in forum: C++
    Replies:
    41
    Views:
    1,043
    Christopher Benson-Manica
    Oct 17, 2003
  2. Replies:
    4
    Views:
    799
    Daniel T.
    Feb 16, 2006
  3. Replies:
    2
    Views:
    553
    klaus hoffmann
    Feb 22, 2006
  4. Replies:
    5
    Views:
    503
    Markus Schoder
    Apr 16, 2006
  5. J.Cottingim

    set Bad variable type - SNMP::Util set

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

Share This Page