| 操作系统 | 标准输入输出设备 |
|---|---|
| Windows | CON |
| Linux | /dev/tty |
Windows
freopen("CON", "r", stdin);
freopen("CON", "w", stdout);Linux
freopen("/dev/tty", "r", stdin);
freopen("/dev/tty", "w", stdout);| 操作系统 | 标准输入输出设备 |
|---|---|
| Windows | CON |
| Linux | /dev/tty |
freopen("CON", "r", stdin);
freopen("CON", "w", stdout);freopen("/dev/tty", "r", stdin);
freopen("/dev/tty", "w", stdout);