how can I write an ANSI C console screen buffer?

前端 未结 4 1416
我在风中等你
我在风中等你 2021-01-18 09:35

I\'m working on making an ASCII based game, and everywhere I look people are saying to use Console.Write() from MSDN, which is dandy and all if you\'re using Windows, but I\

4条回答
  •  孤街浪徒
    2021-01-18 10:06

    I really don't want to use any external libraries like curses (because that would reduce portability)

    What? Libraries like curses and ncurses are designed to make this kind of thing more portable, because...

    and would like to keep to ansi standards if at all possible.

    ...there is no ANSI standard (for C at least) for what you want. Each operating system implements this kind of behavior differently, so if you want a portable way to do it, you need to use a library. Honestly, I'd hate to have to develop for a system that didn't have ncurses ported to it. Imagine all the programs you wouldn't be able to use without it.

提交回复
热议问题