Search:

Type: Posts; User: Williham

Search: Search took 0.01 seconds.

  1. grumpy, I have read ever line of this topic,...

    grumpy, I have read ever line of this topic, multiple times; it is just all VERY new to me; so I'm sorry for not getting it straight away... Seriously this is like Russian to me, or at least it was 3...
  2. So, you mean that other arguments could be...

    So, you mean that other arguments could be entered and print numbers would output differently? Aka not with stdout?

    Also, may be getting a little ahead of myself here but... Once read_numbers has...
  3. It worked!!!! XD I just had to change it to...

    It worked!!!! XD
    I just had to change it to this: fprintf(stdout, "Number %d. %d\n", i, numbers[i]);
    Happy days....

    Right, I'm going to try re-arrange it to call the functions in order, like...
  4. That got the loop working properly, and I'm using...

    That got the loop working properly, and I'm using Bloodshed DevC; i think the compiler warnings are on as I'm very used to seeing a lot of them! This compiled fine though, without any warnings....
  5. Right, starting to feel a little embarrassed...

    Right, starting to feel a little embarrassed now... :frown:

    read_numbers is returning size nicely into the print_numbers function, but in trying to get fscanf to work, which I presumed I needed a...
  6. K, this is my latest attempt at print_numbers: ...

    K, this is my latest attempt at print_numbers:

    void print_numbers()
    {
    printf("Values contained within TXT File:\n\n");
    int numint;
    rewind(fptr);
    while((numint =...
  7. Yeesh. Your right I don't have a good...

    Yeesh.
    Your right I don't have a good understanding of C, I only started taking my programming course sriously last Wednesday. So the past 4 days have been trying to desperately catch up. I would...
  8. Good morning! (if UK ;) ) I believe I've made...

    Good morning! (if UK ;) )

    I believe I've made a fair amount of progress since yesterday, as you suggested laserlight, I've created a separate function to read the numbers and place them into an...
  9. I'm going to call it a day before my eyes fall...

    I'm going to call it a day before my eyes fall out I think! Pick it up again tomorrow.
    Thanks again for the help, I can imagine I'll be back tomorrow! :P
  10. I thought it was part of your sig whiteflags! :P...

    I thought it was part of your sig whiteflags! :P

    laserlight, thank you for your patience with a slow learner, who has a bad habit of trying to cut corners!
    Time to re write the program me-thinks.
  11. Still no luck.. This is the count 0 function...

    Still no luck..
    This is the count 0 function that I'm currently working on:


    size_t cvals()
    {

    printf("Number of 0 values contained within the txt file:\n\n");
    int numint,...
  12. Thanks a lot, I'll give that a try.

    Thanks a lot, I'll give that a try.
  13. Hmm, can you suggest a file command that parses...

    Hmm, can you suggest a file command that parses numbers instead? I was getting away with it before for printing values, but I guess for arithmetic I can't, unless I convert it with a command?
  14. Taking the mean of an array, and counting the 0 values of an array.

    Hey again chaps!
    So, I'm still working on the same piece of work; literally just fell asleep for an hour and a half after trying to take a 10 minute nap...

    Again, I'm making a program which opens...
  15. Got it working!! Cheers guys :D

    Got it working!! Cheers guys :D
  16. Pretty much, I guess that's an example of a...

    Pretty much, I guess that's an example of a multidimensional array? I'll read up on them, got the big "C programming Language" next to me.

    And cheers Salem, those commands should help a hell of a...
  17. Trying to put numbers from a txt file into an aray, without a huge amount of luck!

    Hey guys,
    just signed up as I'm pretty sure you can help me with a few things!
    I'm pretty new to C, so my code will probably be ridden with noob errors... But... Here it goes!

    I'm trying to...
Results 1 to 17 of 17