[英]How to Make NetBeans Treat .cpp Files as C++ Source Code?
While programming in NetBeans, I downloaded all the right compilers. 在NetBeans中编程时,我下载了所有正确的编译器。 C worked fine for me.
C对我来说很好。
But now that I started working with C++, I realized that while opening a new source file C++ with the extension .cpp
the NetBeans goes to the C compilers, and then can't find include such as <iostream>
etc. 但是现在我开始使用C ++,我意识到在打开一个扩展名为
.cpp
的新源文件C ++时,NetBeans会转到C编译器,然后找不到像<iostream>
这样的包含。
But when opening the file with the extension .c++
the NetBeans does go to the right directory and does recognize everything C++ related. 但是当使用扩展名
.c++
打开文件时,NetBeans会转到正确的目录并确实识别C ++相关的所有内容。 Is there any way to change that so that the extension .cpp
will also go to the right directory? 有没有办法改变它,以便扩展
.cpp
也将转到正确的目录? Thank You! 谢谢!
By default, NetBeans does treat .cpp files as C++ source code. 默认情况下,NetBeans将.cpp文件视为C ++源代码。 The file extension mappings are configurable, so it is possible that they are different or corrupt on your machine.
文件扩展名映射是可配置的,因此它们可能在您的计算机上不同或损坏。 To change them do the following:
要更改它们,请执行以下操作:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.