Is there an equivalent one-liner to '#'*number
, which if number was 4 the output of that expression would be "####"
, in C++? If there isn't an equivalent one-liner, I would like to know if there are any quick ways to do this that don't include a for
loop.
Note: I am using C++ 14, on the program I'm working with I can't use C++1z (17), so no C++1z suggestions.