I need to create an array dynamically after reading obj coordinates from a file. The issue I'm having is that the dynamic array, needed to store my vertex group (normal position and texture coordinates), "forgets"/doesn't record the data after its leaves the function.
Why wont this section be remembered when my function terminates?
Hint 1: When you're passing make_mesh is it the actual pointer that is passed or is a copy of it created?
Hint 2: Change the argument type to mesh *& make_mesh in the argument list and try again. You should explain to yourself how and why this works, by the way!
That's because you are sending a copy of the pointer. (its value)
You better return the pointer (transfer ownership)...
Wait, ¿why don't just return the vector?