While programming in NetBeans, I downloaded all the right compilers. C worked fine for me.
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.
But when opening the file with the extension .c++
the NetBeans does go to the right directory and does recognize everything C++ related. Is there any way to change that so that the extension .cpp
will also go to the right directory? Thank You!
By default, NetBeans does treat .cpp files as C++ source code. 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:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.