pointers - How can i return an array c++? -
I am trying to generate some lotto numbers and include that number, but I can not go ahead; Please help
zero getLotto (int rad [7]) {int number [7]; For (int i = 0; i
That is to assign the array dynamically and return an indicator to its first element. This will work in your case, but the collar will generate a requirement for the management of memory ( delete [] the new [] 'Aid memory). This is why C ++ provides us with standard array sections: Use one and return. If you have C ++ 11 support, return.
Comments
Post a Comment