Is there a way to have a variable sized padding in printf?
printf
I have an integer which says how large the padding is:
void foo(int paddingSi
better use std::cout
using namespace std; cout << setw(9) //set output width << setfill('#') // set fill character << setiosflags(ios_base::right) //put padding to the left << "MyText";
should produce:
###MyText