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 you’re looking for faster.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.