- Joined
- Mar 3, 2003
- Messages
- 726
I haven't used C++ for years, and the one thing I can't figure out how to do is to return a pointer to an object from a function. I need to create a new object in the function, and return a pointer to it, that won't be pointing to empty space. Right now I have it sort of working by throwing huge amounts of memory at the pointers with malloc(), but that's wrong on so many levels, and does not work all the way either.
Any tips?
Any tips?