pulling an array from a function
| Cbas (11) | |||
| The function i've made creates an array. How do i access this array in the main area? Thank you Duoas, now is it possible to pass an array to the function, edit it, and access it later? | |||
| Duoas (805) | |||||||
If it is a local variable, you can't; it is destroyed when your function returns:
If it is a global variable, just use its name:
If it is a heap variable, then you need to pass the address back to the main function:
Hope this helps. | |||||||
This topic is archived - New replies not allowed.
