问题描述
像Cygwin那样的游戏库(UNIX'的?)ncurses.h平台
是独立的吗?有没有办法让ISO标准C做的事情
他们呢?示例是没有必要的,我只想知道。
Are cursor libraries like Cygwin''s (UNIX''s?) ncurses.h platform
independent? Is there any way to make ISO standard C do the things
they do? Examples aren''t necessary, I''d just like to know.
推荐答案
编号iso C没有光标,屏幕窗口的任何概念。
curses库已被移植到zig系统(windows,unix和
其他几个),所以如果你喜欢那个它应该是相当便携的
的样子。但你不会在iso C中找到任何相同的东西。
No. iso C doesn''t have any notion of cursor, screen windows whatever.
The curses library has been ported to zig systems (windows, unix, and
several others), so it should be fairly portable if you like that kind
of look. But you will not find anything equivalent in iso C.
编号iso C没有光标,屏幕窗口的任何概念。
curses库已被移植到zig系统(windows,unix和
其他几个),所以如果你喜欢那种外观,它应该是相当便携的。但是你不会在iso C中找到任何相同的东西。
No. iso C doesn''t have any notion of cursor, screen windows whatever.
The curses library has been ported to zig systems (windows, unix, and
several others), so it should be fairly portable if you like that kind
of look. But you will not find anything equivalent in iso C.
哦,实际上它并不是真正的外观。我正在练习C,
,我正在尝试构建一个2D物理模拟器。我不想学习
win32或GTK,ncurses看起来很简单,所以我认为我只需用字母表示粒子,然后再设计一个系统
,其内部位置四舍五入到
终端的网格并打印成一个字母。我不认为我可以用
ISO标准C来做,如果没有curses库,那么我将不得不做物理本身标准的
,但是使用户界面非标准化。非常感谢
。
Oh, it''s not really about the look, actually. I''m practicing with C,
and I''m trying to build a 2D physics simulator. I don''t want to learn
win32 or GTK, and ncurses looked really easy, so I figured that I
would just represent particles with letters and then design a system
in which their internal position is rounded to the grid on the
terminal and printed as a letter. I don''t think I can do this with
ISO standard C, if there is no curses library, so I will have to do
the physics itself standard, but make the UI nonstandard. Thanks much
though.
Semi。你可能会在大多数
常见平台上找到一个curses的实现。然而它可能不会附带流行的编译器。
遗憾的是你无法使用
ANSI C进行任何键盘或屏幕操作。
Semi. You will probably find an implementation of curses somewhere for most
common platforms. However it might not ship with popular compilers.
Unfortunately you cannot do any keyboard or screen manipulation at all with
ANSI C.
这篇关于游标库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!