What the program does: My programs prints out a/multiple rectangle(s)/squar(s) defined by the user's input of width, height, and ammount. The program can also give the area of the box in terms of empty spaces in the rectangle.
I'm back! Whenever I define my "height_Count" variable in the header file with the other declared variables, the "Rectangle_Area()" function works and the "height_Count" variable works correctly, but whenever I define the variable in my constructor it seems to make the float variable -1.005460... I dont know why it doesnt just keep its value.
You can find the variable declaration/definition in the header file. The constructor is in the BoxClass.cpp file towards the bottom. I put the program code that worked. So the "height_Count" is defined in the header file instead of the constructor. I have the "height_Count" variable as a comment in the constructer so it doesnt define there. Again im asking for someone to move the "height_Count" variable to the constructor, set it equal to 1, and have that variable not flip out when running the program.
Your variable height_Count is declared (given the type float) when the class is declared in BoxClass.h.
If you write float height_Count in your constructor then you will be creating another LOCAL variable which will hide the outside one of the same name and which will disappear at the end of the constructor.
Simply remove the word "float" for this variable in the constructor.