Using an int or char
This is my problem, here is the question to better understand "Enter the length of a rectangle or enter 'x' to exit" (when you exit you return to an earlier function, but that is not important). When the user enters a value for the square I need to use it for a mathmatical operations, obviously the int will not accept a char, but if I put a number in a char it will not work because a char has its own numerical value.
P.S. Thanks for the help with my "Stuck in a loop" problem.
A char is simply a smaller int, you can use an int like a char provided the value is consistent with the character set that you use. With appropriate casting, an int can be used as both an int and a char.
One option is to read the input as a string, then convert it to an int using atoi().
cout << "Enter the length of a rectangle (or 'x' to exit):";
cin >> str;
if (str == 'x') return 0;
length = atoi(str);
cout << "length:" << length << endl;