How would I achieve this. I keep getting errors. I tried to return bool values and then switched the return type on the overloaded function to bool but it still doesn't work.
it's just a test case but I ahve also a more advanced program with code like this but m ore complex. Is there a way to actually test to see which variables contain values or which ones you want to use(i know setting one variable in a union will define all since occupying the same memory)... Possibly could I make a union and an int value in a union just go to an int argument? idk...
Could someone also give me a summary on how to overload operators with different types of the actual class being the return type.
The only syntactical problem with that code is bool should be lower case here:
Bool operator> (Bilo);
Another thing is comparing flu.hi with param.i imposes an additional meaning to the placement of the operands in the inequality. Consider only comparing the same members in the operator >, or use a simple function instead of the operator for clarity.