Passing an Object through a function

class obj {...}

obj obj1;
obj obj2;

bool colla1 = Collidea1(0, obj1, obj2);


bool Collidea1 (bool debug, objA, objB) {
if (objA.a1.collide == false || objB.a1.collide == false ) {
if (debug == true) {
<< "a1 Collide"
<< (objA.a1.collide == false)
<< (objB.a1.collide == false)
<< endl;}
return true;

I declared the class
It works fine in one file but i cant get it to work in seperate files
How can i make this work?
Is it even possable to pass an object threw a function?
Try to pass a pointer to the function.
Function signature: bool Collidea1(bool debug, obj *objA, obj *objB);
Function call: Collidea(false, &obj1, &obj2);
Last edited on
Topic archived. No new replies allowed.