It seems that setiosflags isn't even working here. I could set any of them right or left and the output on my screen looks the same. I'm running g++ in gnome-terminal. Any ideas?
I'm trying to get the part with setfill ('-') to be aligned to the left, but it stays right justified no matter what I specify.
Also, standard console windows should be restricted to no more than 80 characters. Meaning, your display is about 150% bigger than it really should be.
Got everything to work by using "left" and "right" in place of "setiosflags(ios::left)" and "setiosflags(ios::right)", respectively. What was I doing wrong with the first method?
ios::left and ios::right aren't the values you wanted. I believe simply left and right would have worked within your call to setiosflags. Long story short, ios::right was a certain value, but not what you wanted. Same with ios::left.