我正在寻找C++代码来获取linux的getch()和getche()函数.我简要地看了一下代码,我看到他们正在使用new关键字就像一个标识符.
这是链接: 什么是Linux中的getch()和getche()相当于什么?
static struct termios old, new;
tcsetattr(0, TCSANOW, &new); /* use these new terminal i/o settings now */
Run Code Online (Sandbox Code Playgroud)
任何人都可以解释它是如何可能的?它是有效的C++代码吗?谢谢.
| 归档时间: |
|
| 查看次数: |
59 次 |
| 最近记录: |