I'm practicing writing classes from scratch and I'm running into an issue creating a function that does something beside get a value from a the private/protected part of the class.
When I attempt to write the fuction void program. I get that the variables must be modifiable values error. What's my problem? all my code is below.
Look closely at the code it has nothing to do with the class or anything. Basically you reversed the statement from what it should be. What you are telling the compiler is that you want x + y to equal z.