Multiply string by Integer | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Multiply string by Integer

Which others languages do that again?

8th Dec 2017, 7:40 AM
Léonce BALI
1 Answer
0
C++ doesn't support string multiplication operation. I would use a for loop and strcat() function to multiply (actually known as 'to concatenate') a string in c++. I'm not sure about other languages, it seems that Perl has a operator 'x' which does the similar work though.
8th Dec 2017, 10:11 AM
Hanz
Hanz - avatar