Good resources for writing console style applicati

2019-02-09 04:55发布

For certain programs nothing beats the command line. Unfortunately, I have never seen good documentation or examples on how to write console applications that go beyond "Hello World". I'm interested in making console apps like Vim or Emacs. Well not exactly like Vim or Emacs but one that takes over the entire command prompt while it is in use and then after you exit it leaves no trace behind. I know that on Unix there is the curses library but for Windows? ...

10条回答
趁早两清
2楼-- · 2019-02-09 05:08
The star\"
3楼-- · 2019-02-09 05:12

Check out some of the mono libs. They have a great one to parse command line arguments but can't remember the namespace.
Miguel just posted some terminal code as well.

查看更多
\"骚年 ilove
4楼-- · 2019-02-09 05:18

PDCurses works on Win32.

查看更多
够拽才男人
5楼-- · 2019-02-09 05:18

There is a small but good tutorial on using C++ for the Windows console at www.benryves.com/tutorials/?t=winconsole&c=all going as far as coding a simple painting program.

查看更多
家丑人穷心不美
6楼-- · 2019-02-09 05:18

You could also try Free Pascal. It is a free ((L)GPL) Object Pascal compiler which is compatible with the Delphi-compiler. It has an console-based IDE, which proves that you can make very good console-applications with it, and which you can use as an example.

If you want to use a graphical IDE to build your console-application, you can download the Lazarus IDE.

As a bonus your application will run on Windows (32/64 bit), Linux, Mac OS X, FreeBSD, Solaris etc...

查看更多
SAY GOODBYE
7楼-- · 2019-02-09 05:19

You can certainly write that kind of application with Delphi, which has reasonable commandline support. People often overlook that Delphi can build any kind of Windows executable, not just GUI apps.

I don't know off-hand if the free 'Turbo' edition of Delphi has anything cobbled into it to PREVENT you from using it to build console apps - I would have thought it would be fine for this kind of thing.

查看更多
登录 后发表回答