0

I am trying to compile a basic code in C++ using the Netbeans 11.1 IDE. For this I have installed Cygwin tools that incorporate the compiler, make tool and debugger.

In Netbeans I installed the plugin to be able to develop in C/C++ and testing with C I have no problem.

enter image description here

When writing the following code, I note that the IDE shows two errors:

#include <iostream>

int main(int argc, char** argv) {
    std::cout << "Hello world";
    return 0;
}

1) In the instruction #include the IDE indicates the message "Cannot find include file ". 2) The IDE also marks the std identifier as wrong saying "Unable to resolve identifier std"

2
  • 1
    Looks like you might be compiling your code as C, not C++? Commented Jan 16, 2020 at 10:24
  • 2
    you need to use g++ not gcc to compile c++ code Commented Jan 16, 2020 at 10:46

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.