Posts

Showing posts with the label returns

Function That Returns Array

Image
Function That Returns Array . However, c programming language does not allow to return whole array from a function. In the following example, the method returns an array of integer type. How to return a local array from a C/C++ function? from www.geeksforgeeks.org I’d prefer to do it this way, as it’s going to get moved into a library, and i think it’d be “cleaned” to do it like this, as opposed to have the function modify a global array. } second point to remember is that c++ does not advocate to return the address of a local variable to outside of the function so you would have to define the local. However, i’m having trouble with some code i wrote for myself as a proof of.