extracting out an array from a function
Jul 19, 2011 at 2:37pm UTC
I want to write a function in which I'd like to extract out an array from that function;
I would be so appreciated if anyone could help me.
Jul 19, 2011 at 2:43pm UTC
Just allocate the array's memory using the new operator and then return a pointer to this new memory block. Any specific problems?
Jul 22, 2011 at 10:01am UTC
I would like to use an array as argument of my function. my code looks like this:
1 2 3 4 5 6 7 8
...
double c[1048576];
myfunction(c[i]); // in order to do some changes in my array
...
is there any tutorial linking for this subject?
Jul 22, 2011 at 2:13pm UTC
Probably basic C/C++ tutorials cover this part. Why? Are you having trouble with this? Check out the tutorial @ this site, in the Documentation section.
Topic archived. No new replies allowed.