Search:

Type: Posts; User: dinjas

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    2,990

    for (n = 0 ; n < j ; n++) { for (a = 0 ; a

    for (n = 0 ; n < j ; n++) {
    for (a = 0 ; a <= j/2 ;a++) {
    if (x == k[n]+k[a]) {
    printf("%d = %d + %d\n",x,k[n],k[a]);
    return (0);
    }
    }
    }

    You are having...
  2. Thread: Need Help

    by dinjas
    Replies
    20
    Views
    2,532

    Couple of things.. you should probably call...

    Couple of things.. you should probably call week(string) after you scan the value using scanf
    then do something like:


    if (!(strcmp(today, "Saturday") || !(strcmp(today, "Sunday")) {
    !!!...
  3. Thread: another method?

    by dinjas
    Replies
    4
    Views
    1,225

    I think what NeonBlack was saying is that he...

    I think what NeonBlack was saying is that he commented out part of your code and it works.
    At least if the user's input is sane.
    ;)
  4. Replies
    2
    Views
    1,271

    try using isspace() to skip over whitespace

    try using isspace() to skip over whitespace
  5. Replies
    6
    Views
    1,418

    oh wait, I'm an idiot. I think you need the...

    oh wait, I'm an idiot.
    I think you need the double pointer because of memory allocation.
    If you did what I just told you too, this is what i think the problem would
    be:


    #include <...>
    void...
  6. Replies
    6
    Views
    1,418

    #include void fun(int *myInt); int...

    #include <...>
    void fun(int *myInt);

    int main(void)
    {
    int j;
    fun(&j);
    }

    void fun(int *j)
  7. Replies
    4
    Views
    2,345

    Why don't you try compiling it with all of your...

    Why don't you try compiling it with all of your compiler's warnings enabled?
    For my compiler (gcc) I tell it to give me more warnings and to nitpick by using
    the
    -pedantic switch to nitpick and...
  8. Replies
    6
    Views
    1,418

    yes, it could just be an int* if the code...

    yes, it could just be an int* if the code actually
    did anything. There arent any functions being called
    in your code, only function declarations, and those are
    incomplete.
  9. Thread: Need Help

    by dinjas
    Replies
    20
    Views
    2,532

    work on Saturday? yuk :/

    work on Saturday?
    yuk :/
  10. I think the main problem you are having is in...

    I think the main problem you are having is in your AddFront function.
    You are inserting at the beginning of the list but dont update the previous
    node value for the old first element. Something...
  11. Replies
    6
    Views
    1,573

    to get you started, how about getting rid of the...

    to get you started, how about getting rid of the semi-colon at the end of this?


    the semicolon causes nothing to be executed inside of the while loop

    instead, do something like

    while(...
  12. Replies
    160
    Views
    1,229,665

    Sticky: Programming in ANSI C by Stephen Kochan...

    Programming in ANSI C by Stephen Kochan

    Good for: Learning ANSI C.
    Not good for: May not be much information on "advanced" features of C.
  13. man, dont give up so easy... use his suggestion...

    man, dont give up so easy... use his suggestion and roll with it, perhaps to google?
    and maybe do a search for something like ... hmm

    C format specifiers

    or maybe you should just store your...
  14. Replies
    398
    Views
    196,277

    argh! finally broke the top 5 and now am moving...

    argh! finally broke the top 5 and now am moving and then leaving town for a few weeeeeks. O(well)
  15. Thread: Gui

    by dinjas
    Replies
    32
    Views
    3,549

    i think you might want to look at: Google...

    i think you might want to look at:

    Google

    and

    ]GoogleAgain[/COLOR]
  16. Replies
    3
    Views
    1,061

    http://www.google.com/search?hl=en&q=C+isdigit%28%...

    http://www.google.com/search?hl=en&q=C+isdigit%28%29&btnG=Search
  17. Replies
    2
    Views
    3,110

    ok. [sshhhh!] I did it with globals [/sshhhh!] :)...

    ok. [sshhhh!] I did it with globals [/sshhhh!] :)

    thnx.
    dinjas
  18. Replies
    2
    Views
    3,110

    using a signal handler to kill processes

    I'm writing a program that needs to accept PID's of running processes (*NIX) from the command line. So the call to my program would look like
    $ ./myprogram 1324 1328 1400
    that part is all fine and...
  19. Replies
    8
    Views
    51,152

    looks like strcmpi() is C++ strcasecmp() is C ...

    looks like strcmpi() is C++
    strcasecmp() is C (GNU) [ and is not case sensitive.

    dinjas
  20. Replies
    11
    Views
    1,225

    good call, I didn't think of that. as...

    good call, I didn't think of that.



    as mentioned in the other post, you don't need to do anything special with printf unless you're printing the value of a variable.
    ex.


    printf("this is a...
  21. Thread: Menu

    by dinjas
    Replies
    4
    Views
    1,612

    I believe strcmp is case sensitive, so it might...

    I believe strcmp is case sensitive, so it might not be a bad idea to prompt your user to enter a choice that begins with a lowercase C since that is what you're checking for. (i.e. Choice != choice)...
  22. Replies
    11
    Views
    1,225

    ok, read your post a little slower... int...

    ok, read your post a little slower...



    int yourfunc( int value )
    {
    //test whether value is even or odd
    ...

    if it's odd
  23. Replies
    11
    Views
    1,225

    Your program doesn't work? if (remainder ) {...

    Your program doesn't work?

    if (remainder )
    {
    printf("You entered %d, it is odd.\n"
    "Here's your 0.\n\n", integer1);
    }
    else
    {
    printf("You entered %d, it is even.\n"
  24. Replies
    19
    Views
    3,273

    you realize this would only count the days that...

    you realize this would only count the days that are the hottest and coolest , give their average, and say that it is the average for (number of hottest days + number of coldest days -1) days?
    The...
  25. Replies
    10
    Views
    1,615

    you don't assign an initial value to i so it...

    you don't assign an initial value to i so it doesn't know what its value is in your do-while loop

    int i;
    there's no format specifier for printf

    printf("Your answer", answer);
Results 1 to 25 of 40
Page 1 of 2 1 2