I'm trying to pass an object to another cpp class to reuse it.
Object created here. I'm putting int for this sample, but it's linked to another class with functions to use for the object. InitHeader.h
int Object;
I call the other class function, trying to pass it the Object made.
InitClass.cpp
CalledHeader::call(&Object);
Object.run();
Setting up the call function
CalledHeader.h
void call(int Object);
Trying to receive the Object in call(), and wanting to reuse it in AnotherFunction() with the same address used in the call Object.run() above.
CalledClass.cpp
void CalledHeader::call(int Object) {
unlock_a_mutex;
}
void CalledHeader::AnotherFunction() {
ReuseObject.aCall();
}
I can't seem to pass the object currently, getting cannot call member function without object with this sample above. I'm lost at the moment.