Results 1 to 3 of 3

Thread: return a vector from a function [resolved]

  1. #1

    Thread Starter
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197

    return a vector from a function [resolved]

    vector myFunction(int iArgument) {} does not work........
    Last edited by markman; May 3rd, 2002 at 08:33 PM.
    retired member. Thanks for everything

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    You probably need to specify a type for the vector, since it's a template class. Try:

    vector<int> myFunction(int iArgument) {}
    Harry.

    "From one thing, know ten thousand things."

  3. #3

    Thread Starter
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197
    wait nevermind. I had it in a class, so I needed vector <ClassName::Struct> x

    thanks anyways
    retired member. Thanks for everything

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width