Please put your code in code tags to make it more readable.
First thing I noticed was that you have a member function called add_dist declared in your class, you attempt to call it in your main yet the actual function has been commented out.
Here, we have a class, Distance with two private members, inches:double and feet:int.
A public default constructor that sets inches and feet to zero, another constructor(overload) that takes two arguments to be assigned to thei respective class variables. A method to diplay their values, set their values, and add two Distance objects.
In the main function, we create two Distance objects, 1 and 3, with the default constructor.
dist2 is created with initial values(through the overload ctor). dist1 is assigned values by the user by calling the getdist member function. dist3 is given the outcome of the sum of dist1 and dist2
Thei lengths are finally outputted.
Do you know class syntax? Do you understand the cout and what it does? Do you know what endl and other stuff mean?
In other words, do you know programming syntax?
If not, read the explanation below. If you do, ignore this comment.
Classes are ways to group variables together. Public: is used to let other classes and functions inherit the variables, and Private: is used for making sure the data doesn't get used by other classes or functions (though subclasses can use them)
cout: as in c- out, because the C programming language is displaying data from the computer "out" to the monitor, hence cout.)
cin: as in c-in. Basically vice versa from cout.
endl means end-line, or move the cursor one line over, like pressing Enter.