Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

std::string a container

Tags:

c++

containers

Is std::string a container class in standard c++ library, restricted to hold only char elements?

like image 893
TL36 Avatar asked Nov 29 '22 04:11

TL36


1 Answers

It's a typedef of std::basic_string<char>, actually. std::basic_string is a container class specifically designed for string operations. This container can be used for wide characters (wchar_t) as well; for that case its typedef would be wstring.

like image 103
int3 Avatar answered Nov 30 '22 18:11

int3