Search:

Type: Posts; User: Salem

Search: Search took 0.57 seconds.

  1. Replies
    10
    Views
    4,733

    But strncpy doesn't append a \0 to where you copy...

    But strncpy doesn't append a \0 to where you copy it from.
    Like I said, so long as you don't have contiguous numbers (there is some kind of space, tab, comma, alpha separator), then you can just do...
  2. Replies
    10
    Views
    4,733

    If you showed us what buffer contains, then we...

    If you showed us what buffer contains, then we might be able to suggest a better way.

    Unless you have say "123456" and you expect to get 123 and 456 as separate numbers, you seem to be doing a lot...
  3. Replies
    10
    Views
    4,733

    If it's just a space separated list of numbers,...

    If it's just a space separated list of numbers, then use this
    man page strtod section 3

    Note the last parameter, you use this to "walk" along the string.
Results 1 to 3 of 3