Right, I've opened ten files that have corresponding names to the ten entries in a char array. How use the strings to access the files though?
Type: Posts; User: cwmccart
Right, I've opened ten files that have corresponding names to the ten entries in a char array. How use the strings to access the files though?
Say I have a char array of file names, how would I use them with a fucntion like fprintf? For example, I have a loop that runs ten times, and each time I want to print to a different file. How do...
I'm closing the file, here's the print loop:
for(q=0;q<1000;q++)
{
fprintf(variancef,"%d: %s\n",q,goodslab[q]);
}
I have an array with 1000 entries that I try to print to a file. However, only 717 make it into the file, with the 718th chopped in half. However, when I switch fprintf to printf (removing the file...
i'm using vc++ 2005.
for some reason, my locals, autos, and watch lists aren't working. the locals and autos lists are empty and the debugger won't recognize variables i add to watch lists. i...
ok, thanks that seems to work well. one last problem: the file being read begins with a label of non-uniform length before proceeding to the numerical data.
one string looks like this:...
alright cool, fgets does the trick. now, i used strtok to chop up the array into pieces, but how should i convert from char into float? thanks for your help.
I'm trying to read a file into an array. The data (.txt) is in a large table (200X10) and contains both text and integers. I'm just coming back to C after using matlab for a long time, so I'm...