I didn't know what to call it - so I gave the title a fancy name
Anyway, I recall seeing a method in a c++ book where you could output a character x amount of times.
I know you can do
and you'll get **********.Code:string z (10, '*'); cout << z << endl;
Now say I don't have a string, just an int. How can i do something like
That code segment prints out *Code:cout << (10, '*') << endl;
How can I do that (so it'll print out 10 stars) or is a for loop required?
Any will be greatly appreciated,
Thanks in advance,