+ 1
How to use string as type in header file in C++
I wanna use string as a type in my class header file, but even with and without the string lib, it shows me: error: 'string' does not name a type How can I use string in the header?
5 Respostas
+ 5
std::string string_name;
+ 3
#include <string>
0
It doesn't work
0
OOOOHHHHH, it's true 🇮🇳Omkar🕉 ! I forgot that the namespace STD wasn't used as default.
0
#include <cstring>