Search:

Type: Posts; User: DuckCowMooQuack

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    778

    Wow...So in this case the use of feof() did cause...

    Wow...So in this case the use of feof() did cause the error! By removing the extra return character at the end it solved the problem of the extra "0" at the end.
  2. Replies
    2
    Views
    778

    CSV C Program

    Hey guys and gals,

    Below is my code, my input file, and the output. I can't figure out why it is adding an extra zero at the end though. Can anyone help me with this?


    CODE:


    #include...
  3. Replies
    4
    Views
    927

    I know that's bad. That's not where the seg fault...

    I know that's bad. That's not where the seg fault is happening though. I'm not focused on proper practice of feof(). Thank you for the useful info though! :D
  4. Replies
    4
    Views
    927

    Where's my seg fault?

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

    int main(void)

    {


    FILE *ofp;
  5. Replies
    17
    Views
    2,436

    BTW: Thanks to everyone who continued to monkey...

    BTW: Thanks to everyone who continued to monkey with this and try for fixes. Thanks a ton!

    -DCMQ

    Happy coding!
  6. Replies
    17
    Views
    2,436

    Ok I solved it. All I did was delete the semi...

    Ok I solved it. All I did was delete the semi colon after


    while (x > 40);

    compiled it...
    added the semi colon back
    compiled it
    ran it...It now works
  7. Replies
    17
    Views
    2,436

    Here's my complete code as of now... ...

    Here's my complete code as of now...


    #include<stdio.h>

    int main(void)

    {

    int x = 0;
  8. Replies
    17
    Views
    2,436

    I am executing the program from within Cygwin...

    I am executing the program from within Cygwin terminal. I edit the code from within Notepad++, save it, compile it, and then run it.
  9. Replies
    17
    Views
    2,436

    This is part of a larger program. I'm just trying...

    This is part of a larger program. I'm just trying to get this to work.
  10. Replies
    17
    Views
    2,436

    It's still not picking up on the printf("%d",x);...

    It's still not picking up on the printf("%d",x);

    I have no idea why???
  11. Replies
    17
    Views
    2,436

    It's odd it's not reading that for me. I'll keep...

    It's odd it's not reading that for me. I'll keep messing with it I guess. Thanks the the fast reply though laserlight!
  12. Replies
    17
    Views
    2,436

    Ok so if you look at line 27 I am calling it to...

    Ok so if you look at line 27 I am calling it to print "x" to the screen. What it should do is print whatever number was last entered by the user. (The loop makes sure this number is less than 40).
    ...
  13. Replies
    17
    Views
    2,436

    Basic Loop

    Hello everyone,

    In the code below why is it not grabbing a value for x?



    #include<stdio.h>

    int main(void)
  14. Replies
    2
    Views
    1,049

    Interative to Recursive help

    How would I convert this iterative function to recursive? (link2 h) is the list.



    void printlist (link2 h)
    {
    link2 head = h;
    link move;
    int x;
    move = head->front;
  15. Replies
    8
    Views
    8,170

    Ha-ha, Just listen to Jim...

    Ha-ha, Just listen to Jim...
  16. Replies
    5
    Views
    4,825

    No problem...Quite honestly, the knoledge of...

    No problem...Quite honestly, the knoledge of knowing how to score a bowling game could be the difference between life and death! I wouldn't want anyone to die :D
  17. Why not just use integers instead a bunch of...

    Why not just use integers instead a bunch of arrays...

    like:

    int t1, t2, t3, t4, t5, t6;
    double t7, t8, t9, t10;

    This will solve your printing problem. Right now when you print, you are...
  18. Replies
    5
    Views
    4,825

    How to score a game of Bowling...How to Score a...

    How to score a game of Bowling...How to Score a Game of Bowling - Bowling Scoring
  19. Replies
    18
    Views
    2,256

    Listen to CommonTater...In every math class I've...

    Listen to CommonTater...In every math class I've taken Range means difference in the highest and lowest value. Example: 1, 2, 7, 9 Highest = 9 Lowest = 1 Range = 8
  20. Replies
    8
    Views
    8,170

    With any modern day computer...Unless you have...

    With any modern day computer...Unless you have like thousands of lines of comparison statements...it won't matter too much. What is the actual program you are implementing the switch statement in?
  21. Replies
    3
    Views
    1,050

    Thanks quzah and kmess! -Duck

    Thanks quzah and kmess!

    -Duck
  22. Replies
    8
    Views
    8,170

    The switch statment in this case is more...

    The switch statment in this case is more efficient. Sometimes it's a decision of how elegent you want your code to look, or how elegent you want to solve a problem.
  23. Replies
    3
    Views
    1,599

    #include usleep(amount of time to...

    #include<unistd.h>

    usleep(amount of time to wait);

    Place usleep(); after any part you want to pause.

    Example:


    #include<stdio.h>
  24. Replies
    5
    Views
    4,825

    Here's some code I wrote...Use it for reference....

    Here's some code I wrote...Use it for reference.



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

    int main()

    {
  25. Replies
    3
    Views
    1,050

    Recursion

    Hey everyone,

    Does anyone have any good examples, tutorials, resources on recursion? It's a new topic i've started and I'm having trouble finding good info on it.

    Thanks,
    !--||\/ Duck \/||--!
Results 1 to 25 of 55
Page 1 of 3 1 2 3