array function

This is a discussion on array function within the C++ Programming forums, part of the General Programming Boards category; How to return an array from a function?...

  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    65

    array function

    How to return an array from a function?

  2. #2
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,170
    You can't.

    You can return a pointer though.

    Or better yet, use a std::vector. You can return a std::vector.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sorting number
    By Leslie in forum C Programming
    Replies: 8
    Last Post: 05-20-2009, 04:23 AM
  2. dllimport function not allowed
    By steve1_rm in forum C++ Programming
    Replies: 5
    Last Post: 03-11-2008, 03:33 AM
  3. Passing my array to function
    By pooty tang in forum C Programming
    Replies: 8
    Last Post: 09-15-2004, 12:19 PM
  4. I need help with passing pointers in function calls
    By vien_mti in forum C Programming
    Replies: 3
    Last Post: 04-24-2002, 10:00 AM
  5. Replies: 3
    Last Post: 03-23-2002, 03:20 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21