Thread: how to divide a char?

  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    18

    how to divide a char?

    Hi! I`m beginning on C programming, and i have the following wuestion: Imagine that i have this:

    char* = "make a better world today";

    and i want to store each word in a diferent string, like:

    string1 = "make";
    string2 = "a";

    hou could i do that?

    Thanks in advance, people!

  2. #2
    Registered User
    Join Date
    Jun 2003
    Posts
    18

    just to complete

    just to complete:
    the string1 and string2 will be char* ok?

  3. #3
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Seems like your question was answered here . I'll close this thread, as the sample code is in the other one.
    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. C++ ini file reader problems
    By guitarist809 in forum C++ Programming
    Replies: 7
    Last Post: 09-04-2008, 06:02 AM
  2. Code review
    By Elysia in forum C++ Programming
    Replies: 71
    Last Post: 05-13-2008, 09:42 PM
  3. Sorting Linked Lists
    By DKING89 in forum C Programming
    Replies: 6
    Last Post: 04-09-2008, 07:36 AM
  4. Passing structures... I can't get it right.
    By j0hnb in forum C Programming
    Replies: 6
    Last Post: 01-26-2003, 11:55 AM
  5. String sorthing, file opening and saving.
    By j0hnb in forum C Programming
    Replies: 9
    Last Post: 01-23-2003, 01:18 AM