Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Writing console c++ apps... console API or library?

Writing console c++ apps... console API or library?

Scheduled Pinned Locked Moved C / C++ / MFC
c++jsonquestion
6 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Texas4519
    wrote on last edited by
    #1

    For those writing console apps which do you think is best?

    V L C K J 5 Replies Last reply
    0
    • T Texas4519

      For those writing console apps which do you think is best?

      V Offline
      V Offline
      Victor Nijegorodov
      wrote on last edited by
      #2

      "is best" for what? :zzz:

      1 Reply Last reply
      0
      • T Texas4519

        For those writing console apps which do you think is best?

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Console apps are best for console apps. For other types not so much.

        1 Reply Last reply
        0
        • T Texas4519

          For those writing console apps which do you think is best?

          C Offline
          C Offline
          CPallini
          wrote on last edited by
          #4

          It really depends on your needs. I usually just use C++ streams for console I/O.

          "In testa che avete, Signor di Ceprano?" -- Rigoletto

          1 Reply Last reply
          0
          • T Texas4519

            For those writing console apps which do you think is best?

            K Offline
            K Offline
            k5054
            wrote on last edited by
            #5

            I'm not sure what the difference is in your mind. std::cout and std::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

            1 Reply Last reply
            0
            • T Texas4519

              For those writing console apps which do you think is best?

              J Offline
              J Offline
              jschell
              wrote on last edited by
              #6

              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.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups