In C we do
char buffer[100];
Is there a way to declare a fixed size std::string?
std::string
You can use the string::reserve method like this
std::string s; s.reserve(100);
But this isn't fixed size, because you can add more chars to the string with string::push_back for example.
2.1m questions
2.1m answers
60 comments
57.0k users