using scanf and family to read in two strings separated by a space from a file in c -
i trying read in 2 string separated space file.
whatever try keep getting 1st string initialized second string null.
some of formatters have tried "%s%s"
, "%s %s"
, "%s[\n\t ]%s"
any ideas of doing wrong?
i think has internal buffer of scanf -- reads first %s
puts invisible character in buffer reads 2nd %s
read , second string null
when complete.
what strings like?
i don't think hypothesis of fscanf() modifying input data placing "some invisible character in buffer" true.
it seems more strings don't conform requirements of %s format specifier.
Comments
Post a Comment