This is totally a homework question and I have the code written and it compiles and runs, but the console hangs when I input the second side.
I suspect the issue is with passing variables between the functions, but at this point, I've been staring at this code and another question for hours and none of it is making sense any more.
I know I don't need fflush(stdin). I was grasping at straws so it's there.
I did try doing breakpoints and looking at the variables. Both side1 and side2 take the inputted value, so it's not garbage.
Is there anything blatantly obviously wrong? Thank you :)
cire, you're right. I'm really struggling to wrap my head around which function prototypes/definitions should have passed variables in this program and which inputs are being stored in which object.
I'm ready to pull my hair out! I'm having a hard time wrapping all these concepts together to work properly.
The rest of the code is the same. Since all the variables are part of the same class, nothing needs to be passed among them, right? Just need that volume passed to the non member function.
It's still stopping after the first input. Should I give it a try in another compiler maybe?