As your DoMenu() is made now, it looks like:
Code:
USHORT DoMenu()
{
USHORT choice;
cout <<"\n\n***Menu*** \n";
cout <<"(1) Draw Your Rectangle\n";
cout <<"(2) Area\n";
cout <<"(3) Perimeter\n";
cout <<"(4) Resize\n";
cout <<"(5) Quit\n";
cin >> choice;
return choice;
}
If you wan't to be sure, it only returns with an integer within the 1 - 5 selection, then make it:
Code:
USHORT DoMenu()
{
USHORT choice = 0;
while(choice < 1 || choice > 5)
{
cout <<"\n\n***Menu*** \n";
cout <<"(1) Draw Your Rectangle\n";
cout <<"(2) Area\n";
cout <<"(3) Perimeter\n";
cout <<"(4) Resize\n";
cout <<"(5) Quit\n";
cin >> choice;
if(choice < 1 || choice > 5)
cout << "Sorry your choice of (" << choice
<< ") is not within the required limit."<<endl
}
return choice;
}
Note the above has not been testet..