Search:

Type: Posts; User: SuchtyTV

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    288

    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 ...
  2. Replies
    6
    Views
    288

    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 =...
  3. Replies
    6
    Views
    288

    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?
  4. Replies
    6
    Views
    288

    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:



    ...
  5. Replies
    4
    Views
    166

    #I am stupid Thank you!

    #I am stupid
    Thank you!
  6. Replies
    0
    Views
    97

    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],
    ...
  7. Replies
    4
    Views
    166

    Reallocate CString on Heap

    Hi,

    I have created a CString as:



    char* p = malloc(3);
    p[0] = '1'
    p[1] = '1'
    p[2] = '1'
  8. Replies
    2
    Views
    165

    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 <...
  9. Replies
    4
    Views
    168

    Understood! Thank you!

    Understood! Thank you!
  10. Replies
    4
    Views
    168

    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?
  11. Replies
    3
    Views
    197

    Works fine now! Thank you!

    Works fine now! Thank you!
  12. Replies
    3
    Views
    197

    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,...
  13. Replies
    12
    Views
    427

    Hey! I am still looking for a answer.

    Hey! I am still looking for a answer.
  14. Replies
    12
    Views
    427

    I use eclipse!

    I use eclipse!
  15. Replies
    12
    Views
    427

    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?
  16. Replies
    12
    Views
    427

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

    Hmm. This is my source code:

    Everything movd to the includes...

    15804
  17. Replies
    12
    Views
    427

    Why gcc cannot resolve symbol?

    Hey

    following code seems not create a warning:


    /* * main.c
    *
    * Created on: Jul 21, 2019
    * Author: Niclas Schwalbe
    */
  18. Replies
    1
    Views
    201

    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...
  19. Replies
    7
    Views
    380

    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?
  20. Replies
    7
    Views
    380

    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);


    ...
  21. Replies
    7
    Views
    380

    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...
  22. Replies
    7
    Views
    380

    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...
  23. Replies
    4
    Views
    344

    How should I declare inlines methods then? ...

    How should I declare inlines methods then?


    EDIT: Worked! Thank you!
  24. Replies
    4
    Views
    344

    Sure - Eclipse created it: ...

    Sure - Eclipse created it:


    ################################################################################
    # Automatically-generated file. Do not edit!...
  25. Replies
    4
    Views
    344

    Why does this code not compile?

    Hey

    given this code:


    #include <stdio.h>#include <stdlib.h>
    #include <string.h>
    #include <unistd.h>
    #include <sys/types.h>
    #include <sys/socket.h>
Results 1 to 25 of 68
Page 1 of 3 1 2 3