On 17 Feb 2004 19:02:43 -0800, in comp.lang.c ,
(PX)
wrote:
>Greetings,
>
>Say I want to read a file line by line so I used fgets(). And I want
>to parse strings from each line of the file, I used sscanf(). But
>there's a strange problem that each time I run the program, sscanf()
>cannot read in first line of file correctly. It always appends a
>character at the end of last string that's been parsed. I am working
>on HP-UX using cc. Anybody has any clue?
Post a small example of your code. We're not telepathic... by the way,
whats the "extra character" ? 0x0d or 0x0a by any chance?
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---