0

fscanf is a C function designed to read character by character from a file to the system
how we can use scanf programmatically to read till first white space ????

:) :)

2
Contributors
5
Replies
7
Views
7 Years
Discussion Span
Last Post by omar isaid
0

If you don't expect the first character to actually be whitespace, you can use "%*s". Otherwise, because %s ignores leading whitespace, you would need to use an exclusion scanset of whitespace:

fscanf ( in, "%*[^ \n\t\r\f\v]" );

Edited by Narue: n/a

0

Thank you very much You are so cute helping me
I talke to Professor and he allowed to use C++ streams

0

>You are so cute helping me
...

>I talke to Professor and he allowed to use C++ streams
So are you asking how to do it in with iostreams or is the question moot now?

0

the question is moot now , thank you very mush for your care

Edited by omar isaid: n/a

0

If you don't expect the first character to actually be whitespace, you can use "%*s". Otherwise, because %s ignores leading whitespace, you would need to use an exclusion scanset of whitespace:

fscanf ( in, "%*[^ \n\t\r\f\v]" );

>You are so cute helping me
...

>I talke to Professor and he allowed to use C++ streams
So are you asking how to do it in with iostreams or is the question moot now?

the question is moot now , thank you very mush for your care

I used the streams of the C++ that is much easier
Thank you very much Narue

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.