Welcome to Dream.In.Code
Become a C++ Expert!

Join 149,494 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,359 people online right now. Registration is fast and FREE... Join Now!




positioning the output

 
Reply to this topicStart new topic

positioning the output

gamodg
22 Mar, 2007 - 09:00 AM
Post #1

New D.I.C Head
*

Joined: 14 Mar, 2007
Posts: 10


My Contributions
please suggest me how to position my output in tc++3 like

sa:1111 da:112212 d:4

i want that irrespective of the length of data after sa or da the distance between sa da d should be constant
User is offlineProfile CardPM
+Quote Post

horace
RE: Positioning The Output
22 Mar, 2007 - 09:08 AM
Post #2

D.I.C Addict
Group Icon

Joined: 25 Oct, 2006
Posts: 573



Thanked: 5 times
Dream Kudos: 50
My Contributions
QUOTE(gamodg @ 22 Mar, 2007 - 05:00 PM) *

please suggest me how to position my output in tc++3 like

sa:1111 da:112212 d:4

i want that irrespective of the length of data after sa or da the distance between sa da d should be constant

you need to set the field width when outputing the data, see
http://www.cplusplus.com/reference/iostrea...ators/setw.html

User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 1/7/09 05:53PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month