When I try to return an object of a class in my program it's always empty.
I tried researching it on google and the only thing I could understand was that apparently it's not that simple. It's usually forum threads that seem to go offtopic really quickly or are just marginally related in the first place.
does the object get destroyed before it can be used? what do I have to do in order to return an object?
Post some code. Not sure I'm following your question. Do you mean a function outside of the class won't return an object of that class type, or a class function won't?