Hi guys, First and most important, I thank you for your time and knowledge. I don't want any code, just need an explanation, or to know what I should read and study, so I can learn how to compare the values from two classes at once please. I can't find this anywhere, I'm certain I'm not looking under the proper terminology.
Your variables obj and val are declared in main(). You try to access them in compare() but they aren't passed in the parameters. That leads to an error.
1 2 3 4 5 6 7
void compare(a &obj, b &val) //passing by reference
{
int tmp1, tmp2;
tmp1 = obj.Get_variable();
tmp2 = val.Get_number();
//rest of your code
}