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 ????

:) :)

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 7 Years Ago by Narue: n/a

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

>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

Edited 6 Years Ago by omar isaid: n/a

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.