I have included string.h, but when I try to use it, as in the following, I get errors

I have included string.h, but when I try to use it, as in the following, I get errors

#include<string.h> std::string something; 

here std will be marked and it says ** error C2039: 'string': is not a member of 'std' **

But in other parts of my program it works, only in some places I get this error

+6
source share
2 answers

The correct header file for std :: string is string , not string.h .

+16
source

std::string dos does not exist in C. You probably want to use C ++.

+1
source

Source: https://habr.com/ru/post/909940/


All Articles