Thread: what does this line of code mean?

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    40

    Question what does this line of code mean?

    what does this line of code mean exactly?

    p = strtok(line_in, " \t<>\n");

  2. #2
    Open to suggestions Brighteyes's Avatar
    Join Date
    Mar 2003
    Posts
    204
    >p = strtok(line_in, " \t<>\n");
    Take the first sequence of characters from line_in up to a tab, opening angle bracket, closing angle bracket or newline and assign the address of the beginning of that sequence to p.
    p.s. What the alphabet would look like without q and r.

  3. #3
    Registered User
    Join Date
    Oct 2002
    Posts
    40
    ok whats another way to write this:

    for (i = 0; i < margin; putchar(' '), i++) ;

  4. #4
    Open to suggestions Brighteyes's Avatar
    Join Date
    Mar 2003
    Posts
    204
    >for (i = 0; i < margin; putchar(' '), i++) ;
    I'd prefer
    Code:
    for (i = 0; i < margin; i++)
        putchar(' ');
    But you can write it a lot of ways depending on what type of loop you use.
    p.s. What the alphabet would look like without q and r.

  5. #5
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231

    Re: what does this line of code mean?

    Originally posted by blindleaf
    what does this line of code mean exactly?

    p = strtok(line_in, " \t<>\n");
    Why not just look at the manual to find out what functions do.
    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 code line, pointer declaration
    By Dedalus in forum C Programming
    Replies: 2
    Last Post: 06-10-2009, 04:34 AM
  2. help again with scrolling without wrapping
    By Dukefrukem in forum C Programming
    Replies: 8
    Last Post: 09-21-2007, 12:48 PM
  3. Can't figure out a line of code...
    By bamera in forum C++ Programming
    Replies: 1
    Last Post: 10-15-2005, 07:11 PM
  4. SSCANF help
    By mattz in forum C Programming
    Replies: 7
    Last Post: 12-10-2001, 04:53 PM