Re: Arrays in C++
Haroon Shafiq <[email protected]>
| Newsgroups | gmane.comp.programming.cppug |
|---|---|
| Message-ID | <[email protected]> |
you are returning an array that is being declared in the called function. it is created on the function local stack and is destroyed as soon as the function returns. you could make it a global array, or create it in the calling function and pass its pointer as an argument to the called function. still if you want to declare it in called function, you can make it static so that its value is preserved even if the function returns. haroon --------------------------------- Do you Yahoo!? Yahoo! Search - Find what youre looking for faster.