Search:

Type: Posts; User: ghoul

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: Macro help

    by ghoul
    Replies
    3
    Views
    313

    Thanks, the term variadic saved me there. It...

    Thanks, the term variadic saved me there. It seems like they work with -std=gcc89? Is that ten years before C99? Well.



    Thanks a lot. This time, for me, it is actually not necessary because...
  2. Thread: Macro help

    by ghoul
    Replies
    3
    Views
    313

    Macro help

    Hello,

    My macro looks like this:




    #include <stdio.h>
    #include <stdbool.h>
  3. Replies
    3
    Views
    369

    Thanks for your input. Good question

    Thanks for your input.



    Good question
  4. Replies
    3
    Views
    369

    Determine the type of a struct at runtime

    Hello,

    My data is coming in the form of a pointer to void. My aim is to dump the data to stderr in a structured way. The data pointed to by the struct is a struct that could be of several types....
  5. That sounds like a decent strategy to me. ...

    That sounds like a decent strategy to me.

    Some would say it is hacky but away from the scholary world, no-one cares for code for as long it implements functionality, patterns etc as expected.
  6. There is a chance that my familiarity with this...

    There is a chance that my familiarity with this subject does not qualify me to comment on this but.

    C++ code implementing certain patterns compared to C code implementing the same pattern or even...
  7. Replies
    15
    Views
    737

    It is as easy as it sounds. Make them point to...

    It is as easy as it sounds. Make them point to the same address.




    ListNode *node = malloc(sizeof(ListNode));

    List->Head = node;
    List->Tail = node;
  8. Replies
    15
    Views
    737

    To me it sounds much better if put like this :->...

    To me it sounds much better if put like this :-> To insert a node at a certain index in the list. That way you accomplish the overall functionality of being able to insert anywhere on the list.
  9. Replies
    15
    Views
    737

    That initializes the variables in 'LinkedList' to...

    That initializes the variables in 'LinkedList' to NULL. After this this, the pointer List.Head and List.Tail are both NULL.

    Kindly note the declaration declares a 'LinkedList' object on the stack...
  10. You might as well think of them as two completely...

    You might as well think of them as two completely different development languages. Like you will usually find me doing.

    o.O
  11. Replies
    4
    Views
    386

    What have you tried? Do you have any code that...

    What have you tried? Do you have any code that you can show?

    My advice would be to use getline() to read the first line then discard/no put the line into any use.



    ...
  12. Haha. Interdersting. Had to try this out. It...

    Haha. Interdersting. Had to try this out. It actually works, yes.

    It would have been great to test this out with clang but:



    Testsqrt.c:24:5: error: non-void function 'sqrt_function' should...
  13. Replies
    9
    Views
    641

    It is not immediately clear to me, at least based...

    It is not immediately clear to me, at least based on this piece of code why they are passing a double pointer and not just a pointer to the function. AFAIK, double pointers are used when working with...
  14. It looks accurate to me based on the fact that...

    It looks accurate to me based on the fact that var1 is stored in 4bytes of memory.

    0xc4159c - 0x0c41598 = 4

    Four bytes is makes sense as the size of an int.
  15. Replies
    4
    Views
    358

    What exactly is not working? It is not exactly...

    What exactly is not working? It is not exactly clear what your input and what the output from the program is from your screenshot.

    Just quickly wrote a similar code, almost identical to what you...
  16. Replies
    8
    Views
    309

    That is correct. With a continue statement...

    That is correct.

    With a continue statement you instruct the program to skip any of the code that would have been executed during the current run of the most adjacent loops.

    Basically, it...
  17. Replies
    8
    Views
    309

    Lazy low hanging fruit. Counting from 1 to 10...

    Lazy low hanging fruit.

    Counting from 1 to 10 could turn into a problem for a programmer?
  18. Replies
    5
    Views
    393

    Shouldn't the code you are trying to trying to...

    Shouldn't the code you are trying to trying to understand and make sense of be in the function below?




    /* Start the scheduler to start the tasks executing. */
    vTaskStartScheduler();
  19. Thread: Indent command

    by ghoul
    Replies
    15
    Views
    561

    It looks a bit like what Microsoft Visual Studio...

    It looks a bit like what Microsoft Visual Studio editor produces by default. Definitely okay if you ask me.

    The question was also not immediately clear to me. The 'indent' command was unknown to...
  20. Thread: Indent command

    by ghoul
    Replies
    15
    Views
    561

    Is it possible that this portion of the code...

    Is it possible that this portion of the code actually executes?




    {
    fprintf(stderr, "Unknown name. Can't decide what to do.\n");
    result = EXIT_FAILURE;
    }
  21. Replies
    2
    Views
    1,814

    Uploading the repos to Github might get me the...

    Uploading the repos to Github might get me the matching lines ...
  22. Also, if you format your code right, it is,...

    Also, if you format your code right, it is, beautiful, easy to read, and appealing the eyes.
  23. Replies
    2
    Views
    1,814

    Variable going out of scope

    While trying to generate some data from some log files it seems like the variable 'count', as can be seen the code below never prints anything. There some few other problems mostly with variables....
  24. My love for Qt grows every day...

    My love for Qt grows every day...
  25. ret = strstr(((*(read_file_array +...

    ret = strstr(((*(read_file_array + (index))).Nome), input);



    Should not the above follow the same syntax as the below?




    scanf("%s", (*(file_array + index)).Matricola);
Results 1 to 25 of 46
Page 1 of 2 1 2