0

Say I have:

array[i]
// and array[4] was the value of 5
// I think something like this works in C++ array[4]*array[4] would give me 25

Is there someway to do the same with strings or is a loop in the only way in C++, because I remember in Python you could do something similar to:

"string"*4
// would give you "stringstringstringstring"
Sam
  • 31
  • 1
  • 6

0 Answers0