Jump to content
  • Advertisement
Sign in to follow this  
DJS2

QUICK question :) is this possible?

This topic is 4237 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Trying to setfill with a character from the ascii table but didnt have much luck. Is this possible? Gave me nothing:
cout << setfill (char(205)) << setw (10);
Gave me error:
cout << setfill ('char(205)') << setw (10);
Thanks

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by DJS2
Trying to setfill with a character from the ascii table but didnt have much luck. Is this possible?

Gave me nothing:
cout << setfill (char(205)) << setw (10);



What did you expect it to give? That's not supposed to print anything to the screen.

This, however:

cout << setfill (char(205)) << setw (10);
cout<<42<<endl;

behaves as expected.


Share this post


Link to post
Share on other sites
ohhh, im sorry, i need at least one char to set the width before it huh? stupid me! thanks so much.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!