C++编译错误消息在 PuTTY 中未正确显示
如果我在通过 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
知道字符 â
为何出现吗?
If I compile a C++ program with errors in Linux connected through PuTTY, I see error messages like:
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
Any idea about why the character â
is coming?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查以确保命令
locale
返回与 PuTTY 配置中设置的编码相同的编码翻译 -> 接收到的数据假定采用哪个字符集。Check to make sure command
locale
returns the same encoding which set in PuTTY configuration Translation->Received data assumed to be in which character set.在选项中将 PuTTY 字符集设置为 UTF-8。
Set the PuTTY charset to UTF-8 in the options.