Writing console c++ apps... console API or library?
-
"is best" for what? :zzz:
-
I'm not sure what the difference is in your mind.
std::cout
andstd::format
(C++ 20) aren't really API's in my mind. They're fine for a simple utility (think ping or netstat), writing log files or doing data I/O, but quickly become unweildly when trying to do full screen I/O like menus, dialogs, pop-ups etc. If you're pursuing the latter, then you probably want to use a library that handles all the screen painting for you, managing overlays, pull down menus, etc. You might want to look at this page to see if any of them meet your needs [C++ Library TUI libraries | LibHunt](https://cpp.libhunt.com/libs/gui/library/tui) You can probably find other examples googling for C++ TUI libraries.Keep Calm and Carry On
-
Long ago I just did it myself. The libraries that get fancy tended to rely on stuff that I couldn't be sure existed or at least would existed in the future. Not to mention that a console app should be pretty simple in the first place. If you need complex user interactions then a console app probably isn't the way. If I didn't want a normal UI then I would be more likely to control it via either command line options and/or configuration files. Actually I have been doing just those for years without any need for anything else.