Example:
Class *_obj1;
Class *_obj2;
void doThis(Class *obj) {}
void create() {
    Class *obj1 = new Class();
    Class obj2;
    doThis(obj1);
    doThi         
        I think you're really trying to ask "How can I return an object created inside my function?" There are several valid ways: