Search:

Type: Posts; User: Hodor

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    114

    Yeah there is

    Yeah there is
  2. I used the library I linked to years ago and from...

    I used the library I linked to years ago and from what I can recall I didn't write a driver for the device, per se, but sent the library the device's VendorId and DeviceId to initialise things and...
  3. You could try this library: GitHub -...

    You could try this library: GitHub - signal11/hidapi: A Simple library for communicating with USB and Bluetooth HID devices on Linux, Mac, and Windows.
  4. Replies
    1
    Views
    90

    That's a bit weird. The version of SDL_bgi that I...

    That's a bit weird. The version of SDL_bgi that I found seems to have a font hardcoded in... although that is an SDL error. You might need to install the library sdl2-ttf (the centos package name...
  5. Some feedback would be nice. Anyway, good to hear...

    Some feedback would be nice. Anyway, good to hear you were successful
  6. There are a few ways to do what you want. The...

    There are a few ways to do what you want. The first problem I see with your printBits function is that it assumes that unsigned long is 32 bits. On my system it's not 32 bits. One way might be...
  7. I changed to int because all the character...

    I changed to int because all the character functions like isspace() and isalpha() expect an int -- not to mention that getchar returns an int. You can probably get away without changing those...
  8. I don't know. I didn't get any double frees. Did...

    I don't know. I didn't get any double frees. Did you change anything else in the meantime? I'm still not convinced that it's creating a tree structure like you want it to but that's something else...
  9. Replies
    7
    Views
    120

    I didn't think it was legal C but I was genuinely...

    I didn't think it was legal C but I was genuinely confused by what you'd written and hadn't written the test code at the time I asked the question; no other reason.
  10. Replies
    7
    Views
    120

    I must be misunderstanding what you meant by "You...

    I must be misunderstanding what you meant by "You probably want to compare with "" instead of "\0"". Not really sure now :(



    int main(void) {
    char str[20] = "";
    return str == "" ? 0 :...
  11. Replies
    7
    Views
    120

    Regarding comparing to ""... is that allowed in...

    Regarding comparing to ""... is that allowed in C? "", is a string literal and therefore you'd be comparing serie_list[i]->serieName (an array) with a, well, string literal/pointer to string (??)
  12. @thebesthere231, make the changes suggested by...

    @thebesthere231, make the changes suggested by @stahta01 and the changes I previously mentioned. Then also change the code in buildTree to



    do {
    character = getchar();
    ...
  13. Thanks. I'm not sure how I missed those. But it...

    Thanks. I'm not sure how I missed those. But it still segfaults :/ pointNode is NULL when head != NULL. Maybe I need sleep. Edit: nevermind, I see it
  14. Regarding the segfault... $ valgrind...

    Regarding the segfault...



    $ valgrind --tool=memcheck --leak-check=full ./test
    ==3753== Memcheck, a memory error detector
    ==3753== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et...
  15. Dealing with the strWord[levelTree] problem first...

    Dealing with the strWord[levelTree] problem first (I changed the previously mentioned pointNode->count++ to head->count++ to get rid of the segfault just so I could run valgrind to ensure my sanity)...
  16. void buildTree(node* head) { char...

    void buildTree(node* head)
    {
    char character;
    node* pointNode = head;

    do {
    character = fgetc(fp); //getchar();
    character = tolower(character); //Turns a big letter...
  17. strWord[levelTree] = '\0'; Is also...

    strWord[levelTree] = '\0';





    Is also wrong (as mentioned); there's no space allocated to store that '\0'
  18. That's not what I'm saying. I'm saying that given...

    That's not what I'm saying. I'm saying that given this code:


    if( (strcmp(argv[1],r)==0) && (argc==2) ) /* This is potentially accessing argv[1] when it doesn't exist */




    What happens if...
  19. Well I've pointed out two problems already. Are...

    Well I've pointed out two problems already. Are those fixed?
  20. You can only edit your first post for a certain...

    You can only edit your first post for a certain amount of time.

    Anyway, here's your code in one file. Don't blame me if you don't like the formatting (I used AStlye to format it) or doesn't suit...
  21. Also, is this meant to be building a tree? If so...

    Also, is this meant to be building a tree? If so I don't think you're doing it properly but I might be missing something because I can't read the code in its current state. Line 103 is weird as well...
  22. In addition to what Salem said, look at the title...

    In addition to what Salem said, look at the title of your thread and your message. What does "codeblocks gives me strange compiled messages..." have to do with what you wrote in the message? I can't...
  23. I think you're right

    I think you're right
  24. Replies
    11
    Views
    182

    Might be best to use that for now and after the...

    Might be best to use that for now and after the bugs are sorted out then move to using lua_newstate (if you have to)
  25. Replies
    11
    Views
    182

    But... you don't trust realloc()? Also,...

    But... you don't trust realloc()?

    Also, you're not passing any errors back to your functions, you're passing them back to Lua. The function needs to behave exactly how Lua expects and it doesn't...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4