Anastasia Sitnina Anastasia Sitnina - 12 days ago 5
C++ Question

Including <string> in c++ using Netbeans

Netbeans fails compilation on:

#include <string>


Output says:

main.c:10:18: fatal error: string: No such file or directory
#include <string>


The previous two declarations are included fine:

#include <stdio.h>
#include <stdlib.h>


I have removed all the code afterwards to make sure.

I am using cygwin_64 and it installed as per Netbeans c++ installation manual and shows versions in CLI

I am new to C++ and I know there have been similar questions, but the answers didn't help me.

Answer

Just try to create new project and follow these steps:

  1. Click File->Create project.
  2. Choose C/C++, then C/C++ application, click Next.
  3. Enter project name and in the right choose C++ in combobox. Or C++11.
Comments