split string

This is a discussion on split string within the C++ Programming forums, part of the General Programming Boards category; my problem is to break up the string .. for example 1234567890 my output will be 12 34 56 78 ...

  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    71

    Smile split string

    my problem is to break up the string ..

    for example 1234567890
    my output will be 12 34 56 78 90

    how can i make it like tat?

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    Output your string one character at a time. If it's an even character number, add a space.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  3. #3
    Registered User
    Join Date
    Nov 2005
    Posts
    71
    thnx mate....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. char Handling, probably typical newbie stuff
    By Neolyth in forum C Programming
    Replies: 16
    Last Post: 06-21-2009, 05:05 AM
  2. split string function
    By paxmanchris in forum C Programming
    Replies: 6
    Last Post: 04-23-2007, 10:56 AM
  3. Custom String class gives problem with another prog.
    By I BLcK I in forum C++ Programming
    Replies: 1
    Last Post: 12-18-2006, 03:40 AM
  4. Classes inheretance problem...
    By NANO in forum C++ Programming
    Replies: 12
    Last Post: 12-09-2002, 03:23 PM
  5. creating class, and linking files
    By JCK in forum C++ Programming
    Replies: 12
    Last Post: 12-08-2002, 02:45 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21