can a function returnan array? i dont think it can, but someone please tell me, it on my C++ final
Name:
Anonymous2005-08-08 18:35
Well, yes and no. Strictly speaking, an array is just a pointer, and functions can return pointers, so yes. However, the array itself is destroyed when it goes out of scope, so the data won't remain intact. You can cheat by declaring the array static, like so: