Code::Blocks 无法找到标准库头文件?
我最近从 Bloodshed 切换到 Code::Blocks。 我编写了一个简单的输入/输出程序来感受它,当我尝试编译它时,我包含的所有标头都出现错误,说没有这样的目录。
我查看了该文件,发现该文件保存为 C 文件而不是 C++ 文件,我该如何更改它? (我知道这就是原因,因为我从 Bloodshed 转移过来的 C++ 文件工作正常。)
I recently switched from Bloodshed to Code::Blocks. I wrote a simple input/output program to get a feel for it, and when I tried to compile it I got errors for all of the headers I had included, saying that there was no such directory.
I took a look at the file and saw that the file was saved as a C file rather than a C++ file, how do I change this? (I know this is why because the C++ files I transferred over from Bloodshed work fine.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如 @nagul 在评论中所说,将文件保存为
.cpp
而不是
修复了没有这样的目录
编译时出错。As @nagul said in the comments, saving the file as
<file>.cpp
instead of<file>
fixed theno such directory
error when compiling.