Search:

Type: Posts; User: drty2

Search: Search took 0.00 seconds.

  1. Ok. Esbo I had had that idea but wasn't sure how...

    Ok. Esbo I had had that idea but wasn't sure how to do it. Thanks.
  2. How am I supposed to do this without a structure?

    My instructor said I wasn't allowed to use a structure as we hadn't been taught it yet. So how am I supposed to read this from a file into an array?
    It's set out like this
    M 40 6
    F 21 2
    F 61...
  3. Replies
    4
    Views
    2,057

    oh lol thanks

    oh lol thanks
  4. Replies
    4
    Views
    2,057

    All my calculations are coming up under the...

    All my calculations are coming up under the Female columns. They're in the correct age and lead type, but all the males are being calculated as females! What am I doing wrong?


    #include...
  5. Replies
    12
    Views
    4,895

    oh i forgot the record before rec[] lol, thanks

    oh i forgot the record before rec[] lol, thanks
  6. Replies
    12
    Views
    4,895

    I read about passing arrays to functions and...

    I read about passing arrays to functions and created this code but I get errors. On the read_file(rec); line I get "error: cannot convert 'record*' to 'rec' for argument '1' to 'void...
  7. Replies
    12
    Views
    4,895

    How to pass a pointer of a struct to a function

    This is the code I have... how do I make it so I can access the info in the read_file function in my print_report function?


    #include <stdio.h>
    #define MAXRECORDS 4

    struct record
    {
    char...
  8. Awesome thanks, work's now :-)

    Awesome thanks, work's now :-)
  9. Ok how would I stop it reading in the newline...

    Ok how would I stop it reading in the newline character?
  10. Help with struct... not returning correct results.

    This is the code I have. To check my struct I put in a printf function and instead of returning
    M 60 2
    F 42 1
    F 12 4
    M 26 3

    it's returning
    F 12 4
    1986850018 8M 26 3
    0 0
  11. Replies
    13
    Views
    2,488

    I don't have a compiler at home so haven't been...

    I don't have a compiler at home so haven't been able to test the code yet.

    So now say that it does work and all the information is in the struct. How would I collate the data for the report?
  12. Replies
    13
    Views
    2,488

    Would this be ok? #include ...

    Would this be ok?


    #include <stdio.h>
    #define MAXRECORDS 4

    struct record
    {
    char gender;
    int age;
  13. Replies
    13
    Views
    2,488

    Ok I just started to write some code and so far...

    Ok I just started to write some code and so far have:


    #include <stdio.h>

    void readfile();

    void main()
    {
    readfile();
  14. Replies
    13
    Views
    2,488

    Ok so I have it in a structure... I'm unsure of...

    Ok so I have it in a structure... I'm unsure of how to compute the data. There's 36 different groups in the report and the only thing I can think of right now is using an If...else statement but...
  15. Replies
    13
    Views
    2,488

    Hey I'm new, need help with a project

    I've attached the project details in a word document.

    I'm trying to write the solution algorithm only in pseudo code at the moment before I write the actual code but am pretty stuck. I know I...
Results 1 to 15 of 16