tabs - How can I capture with fscanf, in C, strings from a file separated by tabulators -
for example following text (in file):
18[tab]robert[tab]nice see again
i want code capture: - 18 - robert - nice see again
i tried fscanf(file,"%s\t",buffer) captured words separated spaces
thanks
use character set, i.e. fscanf(file, "%[^\t]\t", buffer);
the ^
means "all characters except following".
remember check return value.
Comments
Post a Comment