943,701 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 454
  • C++ RSS
Oct 11th, 2008
0

Simple manipulation help needed.

Expand Post »
http://i126.photobucket.com/albums/p.../untitled3.jpg

Which codes do I use so that the answer is not out of place?
I tried using \t and setw but it doesn't work
Similar Threads
Reputation Points: 31
Solved Threads: 2
Light Poster
dexter1984 is offline Offline
49 posts
since Jan 2008
Oct 11th, 2008
1

Re: Simple manipulation help needed.

setw works fine without the need for '\t'. Note that setw is required prior to each item to be formatted.

e.g. cout << left << setw(12) << "item1" << setw(12) << "item2" << endl;
Last edited by dougy83; Oct 11th, 2008 at 6:04 am.
Reputation Points: 85
Solved Threads: 45
Posting Whiz in Training
dougy83 is offline Offline
275 posts
since Jun 2007
Oct 11th, 2008
0

Re: Simple manipulation help needed.

Wow it works, thanks. I totally forgot about the "left".
Reputation Points: 31
Solved Threads: 2
Light Poster
dexter1984 is offline Offline
49 posts
since Jan 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Vector problem
Next Thread in C++ Forum Timeline: binary to decimal





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC