Search:

Type: Posts; User: SuchtyTV

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,770

    Is there anything like casting in C++ ? In...

    Is there anything like casting in C++ ?

    In Java you could pass an Object of an Childclass as an object of every upper-class.
  2. Replies
    3
    Views
    1,770

    Why does the following code not compile

    #include <iostream>
    #include <fstream>
    #include <set>
    #include <map>
    /*
    * Generates a clause_set and a dictionary, given an inputstream
    * Returns a clause_set
    * Returns a...
  3. Replies
    6
    Views
    5,631

    Newnode will be initalised on stack. Then I make...

    Newnode will be initalised on stack.
    Then I make a copy of it using &newnode
    When now the function returns newnode will be deleted, since it is no longer needed it in the stack.
    if I woulld call ...
  4. Replies
    6
    Views
    5,631

    int init_ODIN_Node(ODIN_Node* pnode, BOARD_STATE...

    int init_ODIN_Node(ODIN_Node* pnode, BOARD_STATE state){
    pnode->state = state;
    pnode->leaves_size = INITIAL_LEAVES_FOR_NODE;
    pnode->leaves =...
  5. Replies
    6
    Views
    5,631

    I think it should work. I make a shallow copy of...

    I think it should work. I make a shallow copy of the Node. The copy will be added and the original will decay.
    However all pointers are now stored in the tree?
    Am I missing something?
  6. Replies
    6
    Views
    5,631

    Need help by debugging Memory Leak

    Here is a link to full chess program:
    GitHub - SuchtyTV/Odin

    Trying to debug this code using Valgrind shows huge memory leaks, which I cannot locate.

    I suspect the error to be here:



    ...
  7. Replies
    4
    Views
    4,965

    #I am stupid Thank you!

    #I am stupid
    Thank you!
  8. Replies
    0
    Views
    4,128

    Valgrind Move-Allocation

    Hey,

    given that;



    for(int k = 0; k < 2; k++){
    const char *move = create_move_string_by_fields(pmove_data->moves[i][0],
    ...
  9. Replies
    4
    Views
    4,965

    Reallocate CString on Heap

    Hi,

    I have created a CString as:



    char* p = malloc(3);
    p[0] = '1'
    p[1] = '1'
    p[2] = '1'
  10. Replies
    2
    Views
    1,805

    Awesome C Syntax

    If you look at this code, everythink works just fine.


    int filter_all_legal_moves(BOARD_STATE* pboard_state, MOVE_DATA* pmove_data){ //check all moves
    for(int i = 0; i <...
  11. Replies
    4
    Views
    9,381

    Understood! Thank you!

    Understood! Thank you!
  12. Replies
    4
    Views
    9,381

    A question about Arrays and Pointers

    Hey,

    I am wondering what this is:


    int* a[3]

    - Is it a array of int* or
    - is it a pointer to an array of ints?
  13. Replies
    3
    Views
    3,843

    Works fine now! Thank you!

    Works fine now! Thank you!
  14. Replies
    3
    Views
    3,843

    Realloc does not work as intened...

    Hey,

    I have got the following code:


    /* Adds a move string to a MOVE_DATA * If there is no more space left, space of the MOVE_DATA will be doubled.
    * Returns 1, if successful
    * Returns 0,...
  15. Replies
    12
    Views
    9,913

    Hey! I am still looking for a answer.

    Hey! I am still looking for a answer.
  16. Replies
    12
    Views
    9,913

    I use eclipse!

    I use eclipse!
  17. Replies
    12
    Views
    9,913

    Hmm. I amnot sure what you mean by 1. Thanks...

    Hmm. I amnot sure what you mean by 1.

    Thanks for the support to everyone!


    15805

    Could someone explain to me how to "manage" mutiple files in C-projects?
  18. Replies
    12
    Views
    9,913

    Hmm. This is my source code: Everything movd...

    Hmm. This is my source code:

    Everything movd to the includes...

    15804
  19. Replies
    12
    Views
    9,913

    Why gcc cannot resolve symbol?

    Hey

    following code seems not create a warning:


    /* * main.c
    *
    * Created on: Jul 21, 2019
    * Author: Niclas Schwalbe
    */
  20. Replies
    1
    Views
    3,513

    This Programm failes to compile

    Hey,

    since I am using gcc I have troubles compiling things.
    I attached a ZIP File, which contains my whole c project...

    I definded CHESS_STATE exactly once. But for some reason, he think I...
  21. Replies
    7
    Views
    5,092

    What is your intension, I want to "assign" to...

    What is your intension, I want to "assign" to socket_ids[0] and then after all this done, there is one connection more?
  22. Replies
    7
    Views
    5,092

    Why did not I came up with this idea myself... ...

    Why did not I came up with this idea myself...


    void enterConnectingLoop(struct SERVER_INFO* pserver_data, struct JOB_INFO* pjob_data, int sockfd){
    listen(sockfd, MAX_CONNECTIONS);


    ...
  23. Replies
    7
    Views
    5,092

    Thank you for your support! To 2.: That is...

    Thank you for your support!
    To 2.:

    That is it. I cannot mutex accept() - because everything will be hold back until a client enters

    EDIT: After I fixed everything as you suggested - except the...
  24. Replies
    7
    Views
    5,092

    Posix-Server behaves unexpected

    Hey Guys,

    I have encountered a bug, which I do not fully understand, nor I know why this happens. Also I do not understand how exactly the output which is printed was generated.

    If you be so...
  25. Replies
    4
    Views
    3,292

    How should I declare inlines methods then? ...

    How should I declare inlines methods then?


    EDIT: Worked! Thank you!
Results 1 to 25 of 70
Page 1 of 3 1 2 3