cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Lounge
returning arrays
returning arrays
Mar 8, 2009 at 5:39am UTC
CrimsonAngel
(77)
so i was wondering if it was possible to return an array from a function in c++
not a pointer to an array but just an array see i have this array of one size and i wanna add stuff to it (i cant use vectors or any thing it must be just a array)
any idea's? or am i just over looking the obvious
Mar 8, 2009 at 10:00am UTC
firedraco
(6247)
Well, you can't really return an array, since an "array" is just a pointer the the first element, which is why:
1
2
char
* array;
char
array[];
Are basically the same.
Topic archived. No new replies allowed.