Thread: How to edit output?

  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    11

    Question How to edit output?

    I was wondering what would be the best way to have my output with spaces it shows up like: 112221987 9112009

    and i would like it to show 11 22 1987 9 11 2009

    if possable just for the sake of looks my code is:

    cout<<"Beginning Date: "<<bmonth<< bday<< byear<<endl;
    cout<<"Ending Date: "<<emonth<< eday<< eyear<<endl;
    cout<<"Elapsed Days: "<<360*(eyear-byear)+(30*(bmonth-1)+bday)+30*(emonth-1)+(eday-1)<<endl;

    any help would be great thanks.

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    If you want a space, print a space.

  3. #3
    Registered User
    Join Date
    Sep 2009
    Posts
    11
    such as

    ...<<bmonth <<bday <<byear <<endl;

    ?

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Such as putting << " " << a << " " << space << " " << between << " " things.

  5. #5
    Registered User
    Join Date
    Sep 2009
    Posts
    11
    okay thanks sorry if it was too simple thanks again for the help

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help for my output array
    By qwertysingh in forum C Programming
    Replies: 1
    Last Post: 02-17-2009, 03:08 PM
  2. Adding buttons, edit boxes, etc to the window
    By rainmanddw in forum Windows Programming
    Replies: 1
    Last Post: 04-10-2006, 03:07 PM
  3. WS_HSCROLL in ES_READONLY edit box error
    By Homunculus in forum Windows Programming
    Replies: 4
    Last Post: 02-13-2006, 08:46 AM
  4. Multiline Edit Box Parser
    By The Brain in forum Windows Programming
    Replies: 6
    Last Post: 11-01-2005, 07:15 PM
  5. Replies: 3
    Last Post: 07-23-2005, 08:00 AM