strtok for 'space'

This is a discussion on strtok for 'space' within the C Programming forums, part of the General Programming Boards category; I want to strtok an array with space.i.e "the gate" want to put first into an array and the other, ...

  1. #1
    BEEP BEEP
    Guest

    strtok for 'space'

    I want to strtok an array with space.i.e
    "the gate"
    want to put first into an array and the other, after the space in another array.how to use strtok in this problem?

  2. #2
    Registered User
    Join Date
    Nov 2002
    Posts
    491
    If you are on unix like operating system:
    man strtok

    If you are not, google for 'man strtok'.

    In either case, try to figure it out and then ask for help. Show some sample code. We don't do handouts.

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Try searching these forums too, this has been discussed before.

    http://cboard.cprogramming.com/searc...der=descending
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 20q game problems
    By Nexus-ZERO in forum C Programming
    Replies: 24
    Last Post: 12-17-2008, 04:48 PM
  2. strtok is causing segmentation fault
    By yougene in forum C Programming
    Replies: 11
    Last Post: 03-08-2008, 09:32 AM
  3. trying to use strtok() function to parse CL
    By ohaqqi in forum C Programming
    Replies: 15
    Last Post: 07-01-2007, 09:38 PM
  4. Help debugging my program
    By shoobsie in forum C Programming
    Replies: 4
    Last Post: 07-05-2005, 07:14 AM
  5. Trouble with strtok()
    By BianConiglio in forum C Programming
    Replies: 2
    Last Post: 05-08-2004, 06:56 PM

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