简体   繁体   English

cygwin终端将我的字母转换为数字

[英]cygwin terminal converts my letters to numbers

I recently coded a '.C' file with scanf in order to take keyboard inputs. 我最近用scanf编码了一个'.C'文件,以便接收键盘输入。 To my great surprise, the cygwin terminal converted all the letters I typed to numbers. 令我惊讶的是,cygwin终端将我键入的所有字母都转换为数字。 My program ran properly though. 我的程序运行正常。 The cygwin terminal just didn't show the correct input that I typed. cygwin终端没有显示我键入的正确输入。 It even converted some non-alphabet keys into symbols. 甚至将一些非字母键转换为符号。

If I pressed the same alphabet key multiple times, the numbers (showing up in the cygwin terminal) would change each time I pressed the key. 如果我多次按相同的字母键,则每次按该键时,数字(在cygwin终端中显示)都会更改。 I talked to my computer science professor about this and he didn't know how to fix it. 我和我的计算机科学教授谈到了这个问题,他不知道如何解决。

Another thing to be noted is that my professor was able to use the cygwin executable(?) via the command terminal in order to run my '.C' file. 要注意的另一件事是,我的教授能够通过命令终端使用cygwin可执行文件(?)来运行“ .C”文件。 When he ran the program in this way, the command terminal was able to accept letters. 当他以这种方式运行程序时,命令终端可以接受字母。

I got the cygwin installation package from the GATech mirror website and this is the first error I've come across using cygwin. 我从GATech镜像网站获得了cygwin安装软件包,这是我使用cygwin遇到的第一个错误。

I am using windows XP and netbeans to run the '.C' ; 我正在使用Windows XP和netbeans运行'.C';

check your .(bash)rc settings, try alternativ "consoles" (mintty, xterm,...) 检查您的.bash .(bash)rc设置,尝试使用“控制台”(mintty,xterm等)。

...was able to use the cygwin executable... ...能够使用cygwin可执行文件...

they are still windows .exe files 他们仍然是Windows .exe文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM