>>printf("%s - %s - %s - %s",movies[k].title,movies[k].rating,movies[k].date,movies[k].length);
This doesn't output any newline characters, you need a \n at the end of each line (I assume). Same for the other printf() statement too.
>>printf("%s - %s - %s - %s",movies[k].title,movies[k].rating,movies[k].date,movies[k].length);
This doesn't output any newline characters, you need a \n at the end of each line (I assume). Same for the other printf() statement too.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
if i put a \n after each printf then some will have double space and some will have one spaceOriginally Posted by Hammer
You have a '\n' in the beggining of evry movie title except for the first move in the file.
*edited
try
Code:for (i=0;i<SIZE;i++) { fscanf(in_file, "\n%35[^,],%10[^,],%10[^,],%3[^\n]",movies[i].title, movies[i].rating,movies[i].date,&movies[i].length); }
Last edited by loko; 10-02-2005 at 05:55 PM.
thx works like a charm nowOriginally Posted by loko