Thread: something like strtok

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    63

    something like strtok

    The problem:
    I have a string in a pointer or in an array.I want to seperate the words from this string and drop them into a list.Example: we have string "my name is Bond". I want to seperate the words like: "my" and drop it to the list in the first node, "name" and drop it in the second node, "is" and "Bond" the same.
    Forget the list, I know how to make this
    My problem is that i must write a fynction to seperate the words in a string but i don't know how to begin.Any idea? thanks!


    GO to post 18

    http://cboard.cprogramming.com/showp...2&postcount=18
    Last edited by alzar; 01-18-2008 at 01:16 PM.

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, 05:48 PM
  2. strtok is causing segmentation fault
    By yougene in forum C Programming
    Replies: 11
    Last Post: 03-08-2008, 10: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