Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.26 seconds.

  1. Replies
    4
    Views
    54

    > const char *setexplodetoname[] Well this has...

    > const char *setexplodetoname[]
    Well this has ZERO space allocated to it.

    > setexplodetoname[contents] = ch;
    So every time you do this, you're hosing someone else's memory.
  2. Replies
    4
    Views
    54

    Do you want us to guess (again) what all the...

    Do you want us to guess (again) what all the missing things are in your code snippet?
  3. Replies
    2
    Views
    42

    > It's just simple copy-pasting the same stuff...

    > It's just simple copy-pasting the same stuff and changing the variables once you figure out the logic)
    Yeah, before you reached for ctrl-v, you should have been thinking "How do I make this a...
  4. It's time to step back and do some doodling....

    It's time to step back and do some doodling.
    15811

    Create stories for say
    - pick up weapon
    - put down weapon
    - use weapon
    - place into and out of inventory 'backpack'

    So immediately, you...
  5. Thread: GA nasty bug

    by Salem
    Replies
    4
    Views
    96

    Some thoughts. 1. You need to write code with...

    Some thoughts.

    1. You need to write code with tests written, or at least a plan for testing.
    Test-driven development - Wikipedia
    You need to know that your components work properly before you...
  6. Replies
    2
    Views
    79

    Or there is read the manual page. RETURN...

    Or there is read the manual page.


    RETURN VALUE
    These calls return the number of bytes received, or -1 if an error occurred. In the event of an error, errno is set to indicate the error....
  7. Replies
    1
    Views
    80

    Don't you just close() the client's socket, and...

    Don't you just close() the client's socket, and the client goes away.

    You don't receive any more messages, and the client starts getting errors when they send.
  8. Thread: Async timer in C

    by Salem
    Replies
    3
    Views
    130

    Depends on what you're running asynchronously and...

    Depends on what you're running asynchronously and for how long.

    You can get very limited functionality through alarm() and a signal handler.
    alarm(2) - Linux manual page
    sigaction(2) - Linux...
  9. Replies
    4
    Views
    102

    > but I also found that char* is not (/ no...

    > but I also found that char* is not (/ no longer) allowed.
    What are you smoking?
    You need to cite the reference for that ridiculous assertion.
  10. Replies
    4
    Views
    102

    Did you get any of these errors? $ gcc -Wall...

    Did you get any of these errors?


    $ gcc -Wall -Wextra foo.c
    foo.c: In function ‘main’:
    foo.c:11:12: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’...
  11. Replies
    4
    Views
    97

    $ cat foo.c #include int main(void)...

    $ cat foo.c
    #include<stdio.h>

    int main(void)
    {
    int y = 419; //!! NOT 420
    int b = (y % 25) / 10;
    printf("b=%d\n",b);
    return 0;
    }
  12. Replies
    5
    Views
    98

    Perhaps it's time for a change of school. ...

    Perhaps it's time for a change of school.

    Seriously, whatever hackery you learn for TurboCrap to make this work, it will be of ZERO relevance in the real world if you want to actually write...
  13. Replies
    4
    Views
    97

    No idea. I get 2. If you're getting 1, post...

    No idea. I get 2.
    If you're getting 1, post your test case.


    $ cat foo.c
    #include<stdio.h>

    int main(void)
    {
    int y = 420;
  14. Replies
    10
    Views
    156

    > This question is from HP Code Wars 2019...

    > This question is from HP Code Wars 2019 Bangalore.
    There is a general theme to programming contests, and that is you sit down and think about the problem.

    The first answer that comes into your...
  15. Something like this zach. //!! obsolete,...

    Something like this zach.


    //!! obsolete, don't use #include<conio.h>
    #include<stdio.h>
    #include <string.h>

    // pointless globals
    // char str1[10];
    // char str2[10];
  16. Replies
    10
    Views
    156

    Your posts were in the moderation queue. It...

    Your posts were in the moderation queue.
    It should have told you something along those lines.
    I've now approved your posts.
  17. Replies
    1
    Views
    108

    > I tried to solve this problem but it was...

    > I tried to solve this problem but it was difficult for me.
    So what was your try?

    Subset sum problem - Wikipedia
  18. Replies
    10
    Views
    156

    Sounds like this rather more classic expression...

    Sounds like this rather more classic expression of the same problem.
    Josephus problem - Wikipedia

    > I'm not able to figure out the mistake in my logic and I need help with the entire code for a...
  19. Replies
    1
    Views
    114

    It's a complete mystery isn't it. Well, not...

    It's a complete mystery isn't it.
    Well, not anymore.
    Bye.
  20. Replies
    1
    Views
    106

    Perhaps you could repost your code using...

    Perhaps you could repost your code using copy-as-text and/or paste-as-text.

    The ridiculous colour scheme from your IDE and browser combo was unreadable, and I don't feel like doing any more work...
  21. Replies
    10
    Views
    227

    Moved to tech board.

    Moved to tech board.
  22. Thread: multipointer

    by Salem
    Replies
    1
    Views
    108

    Same old rubbish from the OP, who can't help...

    Same old rubbish from the OP, who can't help asking the same question over and over and over and over and over ....
    Address-pointers.
    Syntax writing of a pointers.
    Comparing pointers
    pointers....
  23. Replies
    10
    Views
    187

    Closed another RAFB thread.

    Closed another RAFB thread.
  24. Replies
    10
    Views
    187

    @Niccolo, RyanC is our resident troll - who was...

    @Niccolo, RyanC is our resident troll - who was banned for a while.
    He's been here 4.5 years, but hasn't learnt anything.
    Next thing he'll be worrying about is how electrons "know" whether to go...
  25. Replies
    6
    Views
    149

    main() has a call to free_ODIN_NODE(&node); ...

    main() has a call to free_ODIN_NODE(&node);

    These do not.
    In minimax - twice


    ODIN_Node new_node;
    init_ODIN_Node(&new_node, state);
    add_Leaf_Copy(pnode, &new_node);
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4