Answers for "string methods in c++"

C++
2

string function in c++?

// let's I want to make a string of same char with specific length
// I can use string something like this
string(length,charecter);
//length - is the length of string we want;
//charecter - the charecter that we want;
// example if string(5,'a') --> 'aaaaa'
//if string(3,'g') --> 'ggg'
Posted by: Guest on November-01-2021

Browse Popular Code Answers by Language