sergio87
Programmer
- Nov 10, 2011
- 1
Hi guys
I've got a problem and didn't manage to solve it up to now. I have a main program and a subroutine, which is called from the main program. The subroutine is storing data in an array, whose length is determined right in the subroutine, and therefore depends on the inputs of the subroutine. This array is then sent back again to the main program. But the main program does not know the length of this array from the beginning, but only after the subroutine is called. How is it possible to allocate this array in the main method, after the subroutine is called?
thank you
I've got a problem and didn't manage to solve it up to now. I have a main program and a subroutine, which is called from the main program. The subroutine is storing data in an array, whose length is determined right in the subroutine, and therefore depends on the inputs of the subroutine. This array is then sent back again to the main program. But the main program does not know the length of this array from the beginning, but only after the subroutine is called. How is it possible to allocate this array in the main method, after the subroutine is called?
thank you