c - Linux下如何在不使用ncurses的情况下移动C中的光标

标签 c linux cursor

我想知道如何在控制台中移动光标?

例如:

gotoxy(int x , int y)
{ /*Put the Code Here*/ }

最佳答案

尝试:

void gotoxy(int x,int y)
{
    printf("%c[%d;%df",0x1B,y,x);
}

另请参阅:gotoxy function with C ( linux/unix )

关于c - Linux下如何在不使用ncurses的情况下移动C中的光标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35679554/

相关文章:

java - 在notifyDataSetChanged 上从RecyclerView 中删除占位符 View ?

Android - gridview滚动问题(滚动非常慢)

php - 无法在 apache 上修改文档根目录的值 - 继续获取/var/www

ios - 如何在应用启动时将 UITextField 设置为默认输入字段

c - 为什么我的分数是零?

将十六进制值转换为字符串

c - 如何在 C 文件中通过 F12 或 Ctrl-Shift-O 使用 JUMP 功能?

C 在 Union 中改变值

python - How to grab string(ip) from netstat pipe the string(ip) to whois command, grab a string(country) 从 whois 输出。并使用 iptables 禁止 ip

linux - Elementary OS 中图形的意外变化?