In C we do
char buffer[100];
Is there a way to declare a fixed size std::string
?
In C we do
char buffer[100];
Is there a way to declare a fixed size 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.