User Profile
Collapse
-
I'll try those, but as it looks there is nothing wrong with returning a pointer from a function? Because I'm lost trying to figure out where the problem lies. -
Using a pointer as a return value.
Hey, I'm having some trouble with a program I'm trying to write and was hoping someone here could help me. Basically I have a dynamic 2D array of the 'Square' class and in the square class is the pointer 'item.' 'item' is a pointer of another class that I have called 'Inhabitant' and I have 3 derived classes off of 'Inhabitant.' I need to somehow have a pointer function in 'square' that returns the pointer 'item.'
From the header file...
No activity results to display
Show More
Leave a comment: