Search:

Type: Posts; User: cuba06

Search: Search took 0.01 seconds.

  1. Thread: C error?

    by cuba06
    Replies
    3
    Views
    1,154

    C error?

    I'm almost done this code, but I don't know why there is an error...



    #include <stdio.h>
    #include <stdlib.h>
    #include <math.h>

    #define FILENAME "chill.txt"
  2. Replies
    4
    Views
    1,333

    What is wrong with this program?

    I've been working on this program for a while now and it isnt doing anything and there arent any errors at all. i've run a debugger but nothing happened. HELP!!



    #include <stdio.h>...
  3. Replies
    9
    Views
    2,579

    Okay, here is the code so far, in its entirety: ...

    Okay, here is the code so far, in its entirety:

    I'm getting errors everywhere, mainly "subscripted value is neither array nor pointer". Can anyone offer any help? I'm getting desperate.


    ...
  4. Replies
    9
    Views
    2,579

    Sweet. Thanks Mats. Another thing. I've got...

    Sweet. Thanks Mats.

    Another thing. I've got another function called fill_In_Insolation that fills in a 2D matrix that has 24 columns and 12 rows. Would I return the matrix in the same way as the...
  5. Replies
    9
    Views
    2,579

    Oh, so if I change the function from float to...

    Oh, so if I change the function from float to void, I don't need a return statement?
  6. Replies
    9
    Views
    2,579

    How would I do that?

    How would I do that?
  7. Replies
    9
    Views
    2,579

    Help with returning arrays using pointers

    I'm writing a program that needs to have several functions. Other than main, one of them is a function called get_inputs. In get_inputs, the program will get information from the user, and then...
  8. Replies
    6
    Views
    2,001

    okay, so I will need to create a pointer to the...

    okay, so I will need to create a pointer to the array, and then return the pointer?
  9. Replies
    6
    Views
    2,001

    Returning Values in C

    If I wanted to return an array from one sub program to main in C, how would I do that exactly?

    What I've got for my sub program right now is:






    float get_inputs(float userInput[4])
  10. Replies
    3
    Views
    1,890

    so you are saying that i should make these things...

    so you are saying that i should make these things global, i.e. outside of main?



    double calculate_eta(int eta[i], int i, double k);
    int print_table(double k, int eta[7]);


    and...
  11. Replies
    3
    Views
    1,890

    linking sub programs to main()

    I have to make a program that will calcuate the efficiency of an engine. The efficiency is called eta, and it uses the variables CompressionRatio and the specific heat capacity (k).

    I need to have...
Results 1 to 11 of 14