I'm trying to create a filled and unfilled rectangle class. I can easily create the filled, but the unfilled one is giving me a little difficulty. Whats going on?
void Rectangle::drawrec()
{
if (filled == true)
{
for (int row = 0; row < height; row++)
{
for (int col = 0; col < width; col++)
{
cout << "*";
}
cout << endl;
}
}
else
{
for (int row = 0 ; row < height; row++)
{
for (int col = 0 ; col < width ; col++)
{
if (height != width)
cout << " * ";
}
}
}