|
-
February 21st, 2002, 10:40 AM
#1
fscanf
(1) How do u identify end of LINE with fscanf?
Any code fragment?
(2) How do u "skip" white spaces?
From MSDN:
"White-space characters: blank (' '); tab ('\t'); or newline ('\n'). A white-space character causes scanf to read, but not store, all consecutive white-space characters in the input up to the next non–white-space character. One white-space character in the format matches any number (including 0) and combination of white-space characters in the input."
It's not very clear without code sample.
THanx in advance.
-
February 22nd, 2002, 06:32 PM
#2
Re: fscanf
I think you should use stream classes instead of fscanf. In contrast to fscanf stream classes provide functions which read the whole line (e.g. getline).
Please - rate answer if it helped you
It gives me inspiration when I see myself in the top list =)
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
[email protected] | ICQ:57404554 | http://soukhov.com
Russian Software Developer Network http://rsdn.ru
-
February 22nd, 2002, 06:35 PM
#3
i've got it.
I've done it with fscanf...
It was a lot of work to understand that there's an "invisible" file position pointer that moves everytime u call scanf... The API can be more user friendly definitely.
Anyway, I've got it. Thanx.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|