View Single Post
May 11th, 2004
0

Re: Return Array from C++

One way:
int* getArray()
{
   static int array[LENGHT] = {1, 2, 3, 4, 5};

   cout << "array in getArray()" << endl;
   printArray(array);

   return array;
}
Team Colleague
Reputation Points: 2780
Solved Threads: 312
long time no c
Dave Sinkula is offline Offline
4,790 posts
since Apr 2004