how would I use set fill to repeat a string. like "%_"

how would I use set fill to repeat a string. like "%_"
1
2
    cout << setfill ('%_') << setw (35);


my IDE is complaining about the above line of code.
closed account (o3hC5Di1)
Hi there,

could you be a little bit more specific as to what your IDE complains about?
Are you getting a compiler error, if so, which?

Also, setfill() takes a char as an argument. char is a type which has only place for one single character, so '%_' does not fit that description.

Hope that helps.

All the best,
NwN
Last edited on
Topic archived. No new replies allowed.