1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
int main(int argc, char** argv)
{
int i, N; //N is the number of points to which the vectors point
FILE *input;
double **vecs; //array of vectors
vecs=vec_array(N,3);
input=fopen(argv[1], "r");
fscanf(input, "%d\n", &N);
for(i=0; i<N; i++)
{
fscanf(input, "%lf %lf %lf\n", &vecs[i][0], &vecs[i][1], &vecs[i][2]);
/*CHECK!*/ //fprintf(stderr, "%lf %lf %lf\n%, vecs[i][0], vecs[i][1], vecs[i][2]);
/*as a check of the correct assingment of the components of the i-th vector*/
}
... //stuff my program needs to do with acquired data
return 0;
}
|