Original Post
How do you make a function that takes multiple objects from two or more struct''s and manipulates thare member data?
The function will need to take a different object struct and a second different object from a new struct and manipulate one object''s member data baised on bolth''s member data...
Like this:
struct A{
int characteristic;
int life;
};
struct B{
int characteristic;
};
void function(A Target, B TargetA){A.life = A.characteristic - B.characteristic;};
How do i make the function take two objects, one struct A and one struct B, that arnt named Target and TargetA but rather what ever objects i make from the struct''s like:
//so i could call the function whith any object''s i make from //the struct...
B Brick;
A Pick;
function(Pick, Brick);
//or
A Cat;
B Dog;
function(Cat, Dog);
So how do you make a universal function that will take objects and manipulate thare struct baised on the name...
And i shouldnt have to overload because im using the same two struct''s but just different objects...
help if you can...?
ahhhh... could allways smell a graveyard