I have had this problem for a while where my Linux system can't seem to link any header files(and yes, I have checked: they all exist in the right locations). Here is a basic script called HelloWorld.cpp:
#include <iostream>
#include </usr/include/string.h>
int main(){
string hi = "Hello WOrld!";
return 0;
}
And this is the error output from the terminal:
HelloWorld.cpp: In function int main():
HelloWorld.cpp:5:1: error: string was not declared in this scope
string hi = "Hello WOrld!";
^~~~~~
HelloWorld.cpp:5:1: note: suggested alternative:
In file included from /usr/include/c++/8/iosfwd:39,
from /usr/include/c++/8/ios:38,
from /usr/include/c++/8/ostream:38,
from /usr/include/c++/8/iostream:39,
from HelloWorld.cpp:1:
/usr/include/c++/8/bits/stringfwd.h:74:33: note: ‘std::__cxx11::string’
typedef basic_string<char> string;
^~~~~~
What can I do?