4

如果我在通过 PuTTY 连接的 Linux 中编译出现错误的 C++ 程序,我会看到如下错误消息:

g++ a.cpp
a.cpp: In function âint main()â:
a.cpp:38: error: expected primary-expression before â)â token
a.cpp:38: error: âwaitpidâ was not declared in this scope

知道为什么这个角色â会来吗?

4

2 回答 2

2

在选项中将 PuTTY 字符集设置为 UTF-8。

于 2011-01-28T07:41:08.577 回答
2

检查以确保命令locale返回的编码与 PuTTY 配置Translation->Received data 中设置的编码相同,假设为 which character set

于 2011-01-28T07:43:20.780 回答