Thread: how to pass a set to function

  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    8

    how to pass a set to function

    i'm trying to pass a set<blabla*> to a function... i know it's done by reference but i can't find the right syntax...

    anyone can provide an example??

    thenx...

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Just like anything else, you put the name of the set inside the parentheses of the function.

    In the parameter list, you put the object just as you would declare the object in the body of the code. If you want to pass by reference, put an & in front of the name.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with 1 function
    By TetsuoShima in forum C Programming
    Replies: 7
    Last Post: 08-15-2010, 02:13 PM
  2. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 03:06 PM
  3. Speed test result
    By audinue in forum C Programming
    Replies: 4
    Last Post: 07-07-2008, 05:18 AM
  4. Bisection Method function value at root incorrect
    By mr_glass in forum C Programming
    Replies: 3
    Last Post: 11-10-2005, 09:10 AM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM