返回“h”。 最佳答案 chtype-6ren">
gpt4 book ai didi

c - 在控制台中获取 X、Y 上的符号

转载 作者:行者123 更新时间:2023-11-30 16:02:20 25 4
gpt4 key购买 nike

如何在控制台中获取 X、Y 上的符号。

示例 mvprintw(1,2,"H")。和 SOME_FUNCTION_I_AM_LOOKING_FOR(1,2) -> 返回“h”。

最佳答案

chtype mvinch(int y, int x)浮现在脑海中。

来自人3NCURSES英寸:

SYNOPSIS

   #include <curses.h>

chtype inch(void);
chtype winch(WINDOW *win);
chtype mvinch(int y, int x);
chtype mvwinch(WINDOW *win, int y, int x);

DESCRIPTION

These routines return the character, of type chtype, at the current position in the named window. If any attributes are set for that position, their values are OR’ed into the value returned. Constants defined in can be used with the & (logical AND) opera‐ tor to extract the character or attributes alone.

Attributes

The following bit-masks may be AND-ed with characters returned by winch.

   A_CHARTEXT     Bit-mask to extract character
A_ATTRIBUTES Bit-mask to extract attributes
A_COLOR Bit-mask to extract color-pair field information

关于c - 在控制台中获取 X、Y 上的符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5382093/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com