Thread: better...

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

    better...

    please: how can i, as example, take the n first letters from a char variable, like:

    char[30]= "marcelo";

    i want the 5 first ones in a new variable like:

    char[5] = 5 first ones , so, char[5]="marce";

    how could i do that in C?

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

    ok, but

    ok, but i think its not really like that what i want to make here. the fact is that i want to insert a phrase in a loop, and every time it finds a space caracter in the phrase, i`d like it to take that word and put it in another char variable. could you help me with that?

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

    sorry...

    sorry, but which is the library that contains the strtok() function?

Popular pages Recent additions subscribe to a feed