Search:

Type: Posts; User: lonewolf367

Search: Search took 0.00 seconds.

  1. Replies
    4
    Views
    1,136

    im very new at this. so i have max_temps, would I...

    im very new at this. so i have max_temps, would I want to define that as a constant and make it something like
    sizeof(double)*num_temps
  2. Replies
    4
    Views
    1,136

    Read Array Size

    Ok, well everything basically works in my program just fine. I just need to make it a tad bit more flexible.

    I have a program that reads numbers from a binary file into an array. I have my array...
  3. Replies
    11
    Views
    2,052

    thanks. i got it working. just had to add a...

    thanks. i got it working. just had to add a little pointer in there from my function :)
  4. Replies
    11
    Views
    2,052

    } // Read data file double read_file(int...

    }

    // Read data file
    double read_file(int num_temps, double temps[])
    {
    int i=0;
    double temp;
    FILE *filedata;
    filedata = fopen("c:\\labdata.txt","r");
  5. Replies
    11
    Views
    2,052

    Ok, now it reads the first number in my file. But...

    Ok, now it reads the first number in my file. But thats it...
  6. Replies
    11
    Views
    2,052

    I made changes as suggested but still same error....

    I made changes as suggested but still same error.

    Ok I made some changes. However no data is pulled from the text file.



    double read_file(int num_temps, double temps[])
    {
    int i=0;...
  7. Replies
    11
    Views
    2,052

    Read File Problem

    I am trying to get a list of numbers from a file and store each number in an array.

    I think I have the structure right but I'm getting a memory referance error and the warning that comes up is:
    ...
  8. Replies
    8
    Views
    1,580

    Ok, thanks. I switched above,below,average,...

    Ok, thanks. I switched above,below,average, ect... to be entered into an additional array. That all works now.

    However, the sorting does not work. That is the only peice I'm now missing.
  9. Replies
    8
    Views
    1,580

    oh, i want to pass the array temps[] into the...

    oh, i want to pass the array temps[] into the sorting algorithm. i thought arrays were passed by referance.

    and the num_temps is what the user imputs so that can chose the amount of numbers they...
  10. Replies
    8
    Views
    1,580

    This is all I've changed so far: double...

    This is all I've changed so far:



    double temps[N];
    int num_temps;
    double avg, high, low;
    int above, below, equal, more100, more32, less32;
    double f_to_c(double f_temp);
    double temps[N];
  11. Replies
    8
    Views
    1,580

    Alright, thanks. I made all my variables global...

    Alright, thanks.
    I made all my variables global now.

    The compiler errors I am getting are "functiion: incompatible types".
    And a few warnings "different types for formal and actual parameter"....
  12. Replies
    8
    Views
    1,580

    Extreme Newbie...

    Ok, I am very new to C programming. I have tried to figure this little peice out for like 6 hours now. I just don't quite understand the syntax for user defined functions.

    I think I have the code...
Results 1 to 12 of 12