Separate console or a area of console for taking input.

hi. I'm building a chat program. I want it to look like this.

------------------------------
friend: Hello how are you? |
you: fine. TY |
you: what are ur plans for the|
day! |
friend: lets meet at dark's. |
|
|
|
|
------------------------------
Great Idea! | ----->Separate area for taking input
------------------------------


(the spaces were removed by cplusplus.com. I intended the all the '|' in one line)

Any ideas how can I get a separate space for input.
Also the input process should not block the incoming messages from friend.
Last edited on
I believe you can use the [tt][/tt] tags to create monospace font. I think that preserves the spacing.

That's not possible with standard C++, so I'd recommend you look into the curses console library.
---------------------------------
| friend: Hello how are you?    |
| you: fine. TY                 |
| you: what are ur plans for the|
| day!                          |
| friend: lets meet at dark's.  |
|                               |
|                               |
|                               |
|                               |
---------------------------------
| Great Idea!                   | ----->Separate area for taking input
---------------------------------


I wrote the text in Notepad, with the font Lucida Console, which is monospace and then pasted it into cplusplus editor inside [output][/output] tags.

But the kind of app you're talking about would be much better as a simple GUI app. Have you used any of the GUI libraries?

Andy
Last edited on
Thanks.
Topic archived. No new replies allowed.