-
Dos Graphic....kinda
if i wanted to create a program in console enviroment, and surround it with something simple like *, how would i go about that? All the turtorials I can find is based on windows stuff, i'm talking about good ole dos type. Even a point in the right direction would be helpful. Heres kinda what i mean.
Code:
*******************************
*-----------------------------*
*-----------------------------*
*-----------------------------*
*---------program-here--------*
*-----------------------------*
*-----------------------------*
*-----------------------------*
*-----------------------------*
*******************************
-
Do you mean you want your program to display that or you want your source code to look like that......?
-
-
I want my program to run after its compiled to run inside the *'s.
-
example:
you could do something like this although i am not sure this is what you mean.
Code:
cout << "********************" << endl;
cout <<"* *" << endl;
cout <<"* Put ur program *" << endl;
cout <<"* here *" << endl;
cout <<"* *" << endl;
cout << "********************" << endl;
again im not sure if this is what you mean but i tried......
(edit)
aaaah! it messed up the code o well u know what i mean.
-
tried something similar, hmmm...maybe that will work, thanks. Sorry I couldn't better explain what I meant.
-
That'd work.
Another suggestion which I'll put out there is to play around with <iomanip>, and the modifying the alignment, fill and width properties for cout so that it will (sort of) automatically do that stuff for you.
I generally ignore the formatting of output streams (with the code I deal with, that stuff is usually long buried or somewhat irrelevant), so I can't be of much more help than to just point to the idea.
-
Sounds like you need to create some kind of primitive window manager, where the *'s are drawn as the window border by the window manager.
Perhaps http://en.tldp.org/HOWTO/NCURSES-Programming-HOWTO/
There are win32 ports of ncurses