So, I created a class, and then create two separate instances of this class:
disc discOne; // Construct objects
disc discTwo;
The class declaration is executed separately through the header file:
class disc
{
public:
disc();
~disc();
void changeRadius(short);
void throwDisc(short, short);
void printLocation() const;
void printInfo() const;
private:
short radius;
short xlocation;
short ylocation;
};
I can use the printInfo () and changeRadius () functions, for example, but how can I compare (for example) the radius between these two objects? I want to do something more complex than this, but if I understand the basics, I want to try to understand this.
The problem I ran into is that I used structures in the past that (if that were the case), I would just go:
discOne.radius > discTwo.radius
- . , . , - , - .