mardi 3 juillet 2018

Append number of chars to string [C++]

Can we append a number of chars to string? e.g. In python, we can do something like:

string = ""
string += 6*'c'

So now string is equal to cccccc. Is there a possible way to achieve the same in C++?

Aucun commentaire:

Enregistrer un commentaire