Search:

Type: Posts; User: cwmccart

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,415

    Right, I've opened ten files that have...

    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?
  2. Replies
    3
    Views
    1,415

    Variable filenames

    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...
  3. Replies
    6
    Views
    1,972

    I'm closing the file, here's the print loop: ...

    I'm closing the file, here's the print loop:



    for(q=0;q<1000;q++)
    {
    fprintf(variancef,"%d: %s\n",q,goodslab[q]);
    }
  4. Replies
    6
    Views
    1,972

    fprintf behaving strangely

    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...
  5. Replies
    1
    Views
    931

    debugging in VC++

    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...
  6. Replies
    10
    Views
    2,255

    ok, thanks that seems to work well. one last...

    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:...
  7. Replies
    10
    Views
    2,255

    alright cool, fgets does the trick. now, i used...

    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.
  8. Replies
    10
    Views
    2,255

    Read file into array

    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...
Results 1 to 8 of 8