Why can't I include the string library in C++? [closed]
This is a short one.
There's a fatal error: No library titled "string" or something like that.
#include <string>
using namespace std;
int main () {
//[insert code here]
}
It should be correct, I looked how to use strings and this is exactly what to do.
Solution 1:
Make sure you are compiling it with a c++
compiler. Using a C compiler for C++ code may produce confusing error messages just like the one you got.