Alright, so I need help with creating a hollow rectangle. I already have a code for a filled out one but I don't know what I need to change to make it hollow. I want to try and make it without strings.
Well I would suggest creating code that prints lines allong the edges.
So you would print when
Your current x or y values were at zero OR
Your current x or y values were one less than their respective width (x) or height (y)
1 2 3 4 5 6 7 8 9
for(unsignedint countery=0; countery<height; countery++)
{
for(unsignedint counterx=0; counterx<width; counterx++)
{ //check if counter x or y is on an edge
if(counterx==0 || countery==0 || counterx==width-1 || countery==height-1)
std::cout <<Character;
}
std::cout <<"\n";
}
If I wasn't trying to retain your sample code I might have preferred for() loops here, and renamed counting variables to make them more distinguishable from the rectangle dimensions.