Hello.
My question is the following, I want to save in a file / read from a file, an entire vector with different values in each position. But, if it is a very long vector... instead of doing something like this:
But if we're talking about a really long vector, it can become tedious.Code:fp = fopen ("Datos.txt","w"); fprintf (fp, "%d %d %d %d %d ", vector[1], vector[2], vector[3], vector[4], vector[5]); fclose (fp);
Maybe there could be done something like:
I know it's wrong, it's to give a general idea. Any help is apreciated.Code:for(f=0;f<6;f++) {fprintf(fp,"%d",vector[f]);



LinkBack URL
About LinkBacks



