A string is mutable and it’s length can changed at run-time. But you can use the “fill constructor” if you must have a specified length:
http://www.cplusplus.com/reference/string/string/string/
std::string s6 (10, 'x');
s6 now equals “xxxxxxxxxx”.