views:

351

answers:

4

I really like the console and got recently hooked on programming console applications using nCurses mainly in conjunction with the C programming language.

Unfortunately i think the ncurses API is totally borked and very hard to use, and the C++ bindings are undocumented.

So my question is, what is THE API to use for C++ console applications?

+2  A: 

Short answer: depends on your needs ;)

Still short answer: many tools aren't interactive (cat, sed, wc), so you don't need anything like ncurses. If you need something commandline based, then you have Readline. At last, what you seem to like, is just a text based GUI with a 2D layout. In this case I don't know ;)

Tristram Gräbener
A: 

Would you not consider using escape sequences to set the colours, cursor positions and so on? That is the only thing I can think of. Have a look at this link here which shows how to print a colour string. The escape sequences are from the ANSI standards, also listed here.

Hope this helps, Best regards, Tom.

tommieb75
+2  A: 

maybe you'd like s-lang better?

just somebody
@just-somebody: +1...Hey! That's what I was trying to remember...knew of such a tool but the name eluded me..I also thought of the one that is used in shell scripts, what was that text mode menu interface for the kernel configuration before compiling..dialogs, cannot remember as its been a while since I recompiled a kernel!!! :) Nice catch though! Damn...why did I not think of that... :)
tommieb75
@tommieb75: the command for dialogs is called "dialog" ;)
just somebody
A: 

It isn't exactly THE API, but in the olden times borland turbovision library was popular. Borland released the source to public domain some years ago, and good people ported it.

Here it is: http://tvision.sourceforge.net/

Apparently they stopped making releases in 2007.

pwned