is there a way to make fscanf read in a whole string with blanks inlcuded.... i know fscaf ... or scanf stops when it encounters a blank, is there a way around this? So I can store a sentence?
This is a discussion on fscanf question within the C Programming forums, part of the General Programming Boards category; is there a way to make fscanf read in a whole string with blanks inlcuded.... i know fscaf ... or ...
is there a way to make fscanf read in a whole string with blanks inlcuded.... i know fscaf ... or scanf stops when it encounters a blank, is there a way around this? So I can store a sentence?
Sure, use function fgets!
Do a little board serch for fgets, and you'll find it
Gotta love the "please fix this for me, but I'm not going to tell you which functions we're allowed to use" posts.
It's like teaching people to walk by first breaking their legs - muppet teachers! - Salem
Or a FAQ search.
Yes, you can make scanf read entire lines. However, fgets is much better for this sort of thing. The FAQ contains entries on getting a line from the user.
Quzah.
Hope is the first step on the road to disappointment.