I'm trying to switch this code from a struct to a class to get some practice in, I have hit a road block and unclear of what i'm trying to do. I have little experience with structs or classes. I started some of it, I am trying to change the height1, height2 to constructor to set the private members. I don't want any solutions just a nudge in the right direction and how to better conceptualize classes. Thank you
change the word struct to class and add a public: after the first {
eg
struct foo{stuff}
becomes
class foo{ public: stuff}
you may need to clean it up after, to make private things private with access functions and all that, but this is all that is required for syntax. The other stuff you need to do is OOP style and convention.
in syntax, in c++, a struct is just a class with default public access (class is default private).
in usage and convention, a struct is usually seen as just pure data in c++ (no methods at all) and classes have methods and other complexity (inheritance, operators (which are technically methods), etc).
Ok thank you I will try these. And I have to figure out the mutation, to change and use the inches and feet. So I was trying it out and made some changes and having still some issues
Thank you everyone for your help! I will continue on with maybe trying to add another object for weight and do a conversion with that as well. I have always had trouble with programming but I refuse to believe i can't grasp all this.