Problems with Scanf()

I am trying to import 3 columns of data that are all in one text file. I thought scanf would do the trick but i dont think i understand it well enough
for(int i=0;i<N;i++) scanf("%lf %lf %lf", &x[i], &y[i], &err[i]);
could anyone help me out.
scanf is used for the standard input. You should use fscanf.
so if i simply replaced scanf with fscanf it should work?
You should read description of fscanf before using it.
Topic archived. No new replies allowed.