-
drawing a box
Ok, this is the problem. I'm trying to draw a box. It's part of our assignment to draw a box so we can put stuff in it. It's just a plain on old box.
so far I have:
void main()
{
int box;
cout << "\xF9";
for (box = 2; box < 75; ++box) //for first corner on top
cout << "\xF9";
for (box = 2; box < 20; ++ box); // for line across the top
cout << "\xF9"; // for second corner on top
gotoxy(75,1);
cout << "\xF9"; // this is where the problem is
for (box = 74; box > 20; -- box);
I can't get the line to go down the side. I'm about to pull my hair out.
Please save me from being balder than i am.
Thank you kindly,
k
-
Read me
and
Read me too
And for a non-looping way:
Code:
#include <iostream>
const char box[] =
"+------+\n"
"| |\n"
"| |\n"
"| |\n"
"+------+\n";
int main()
{
std::cout <<box <<std::endl;
}
-
drawing a box
Thank you most kindly. I will give it a go!
-
Also, this recent thread had somethings you might want to use.
-
draw a box
Yes that was kind of a help, even though it's not exactly what i'm looking for, I'm still working on the first one (crosses fingers).
Again thanks, I do appreciate it.