im reading in a file line by line as such:
fscanf(fpin,"%d\t%d\t%s",&startpos,&endpos,name);
the file is like this:
0 100 john doe
but for name, it only reads in "john",
how would iget it to read in the entire thing?
Printable View
im reading in a file line by line as such:
fscanf(fpin,"%d\t%d\t%s",&startpos,&endpos,name);
the file is like this:
0 100 john doe
but for name, it only reads in "john",
how would iget it to read in the entire thing?
nvm i got it, here it is for anyone else who needs it
fscanf(fpin,"%d\t%d\t%[^\n]s",&startpos,&endpos,name);