Thread: setwidth help

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    137
    I believe you use it like this:

    don't forget to include <iomanip>
    cout << "Some text" << setwidth(5) << "Another text" << setwidth(5) << "Last text" << endl;

    It adds some spacing. You may have to experiment with how long it should be.
    ★ Inferno provides Programming Tutorials in a variety of languages. Join our Programming Forums. ★

  2. #2
    Registered User
    Join Date
    Oct 2008
    Posts
    3
    got it working, thanks a lot. Assignment finished on time.

Popular pages Recent additions subscribe to a feed

Tags for this Thread