Search:

Type: Posts; User: thames

Page 1 of 8 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    1,296

    Were you able to compile your program (no more...

    Were you able to compile your program (no more errors about unresolved identifiers)?


    yes... the problem hasn't appeared when I compiled the program. The IDE (Netbeans) was pointing htonl...
  2. read the classic C book The C Programming...

    read the classic C book The C Programming Language by Kernighan and Ritchie. It can be dauting at first, but it's an awesome book!
  3. Replies
    5
    Views
    1,296

    sorry for that. The snippet compiled and ran...

    sorry for that. The snippet compiled and ran successfully.

    The output should be "compressing..." uncompressing..." instead, I don't get any errors.



    gcc -g -Wall *.c
    thames@semath...
  4. Replies
    5
    Views
    1,296

    Can't find htonl with inet.h or in.h

    Good morning. I'm reading a code for LZ77 compression but htonl and other network functions can't be recognized (I get that unresolved identifier problem) even including



    #include <arpa/inet.h>...
  5. Replies
    4
    Views
    3,986

    they are coded as lists I just didn't put all the...

    they are coded as lists I just didn't put all the implementation. Also, this isn't a BST, just a binary tree without the features of the former. Was my line of thought correct?
  6. Replies
    4
    Views
    3,986

    Merging binaries trees into another one

    Good evening. I'm studying merging of two binaries trees and I was concerned about two instructions:



    bitree_root(merge)->left = bitree_root(left);
    bitree_root(merge)->right =...
  7. Thread: !memcmp in set

    by thames
    Replies
    2
    Views
    1,345

    !memcmp in set

    Good afternoon. I've already read the doc for memcmp still I don't understand why in this function:



    static int match_int(const void *key1, const void *key2) {

    ...
  8. Replies
    12
    Views
    4,533

    I understood your explanation anduril. Many...

    I understood your explanation anduril. Many thanks.
    I copied a code from the videos I watched (a simpler version of a linked stack):



    /*
    * File: stack.h
    * Author: thames
    *
    *...
  9. Replies
    12
    Views
    4,533

    wow thank you for the incredible effort to...

    wow thank you for the incredible effort to explain me stacks with linked lists. I'm also watching some videos on youtube about the subject.
  10. Replies
    12
    Views
    4,533

    Now I'm a bit lost. How can the head be the top...

    Now I'm a bit lost. How can the head be the top (the first popped element) of the stack?
  11. Replies
    12
    Views
    4,533

    I think I understood this problem: I'm passing...

    I think I understood this problem: I'm passing NULL as an element for popping and pushing. If you look to the usual implementation of the stacks, this is incorrect since you need to pass the...
  12. Replies
    12
    Views
    4,533

    invalid free() in stack using linked list

    Good afternoon. I'm trying to debug a stack. I think the problem has something to do with free(old_element) and free(data) but I tried to do some modifications (commenting one of them) without...
  13. I see! many thanks!

    I see! many thanks!
  14. What's happening in that Circular List clist_rem_next function?

    Good afternoon everyone. I already studied some illustrations from the book for the Circular lists. Therefore, my problem is that I don't know what's the purpose of writing



    old_element =...
  15. I think I got it while I was looking at some...

    I think I got it while I was looking at some illustrations.




    element->next->prev = new_element;
    element->next = new_element;


    the referenced element is the node after the current node...
  16. In fact, I was just trying to understand the...

    In fact, I was just trying to understand the codes from Mastering Algorithms With C.
  17. What's happening in that Double Linked List insert next?

    Good evening. Can you explain to me the code below from function dlist_ins_next? Elysia, I turned back and I saw I need to read that book you recommended me if I want to read other books. But not now...
  18. Replies
    13
    Views
    1,923

    ok :eek: the original C code: /* *...

    ok :eek:

    the original C code:



    /*
    * File: memswap.c
    * Author: thames
    *
  19. Replies
    13
    Views
    1,923

    haha ;)

    haha ;)
  20. Replies
    13
    Views
    1,923

    I already knew that. I'm starting to read a book...

    I already knew that. I'm starting to read a book called Mastering Algorithms with C which teaches Data Structures with C and there was a swap method in C using memcpy and I was trying to translate it...
  21. Replies
    13
    Views
    1,923

    Trying to delete void* ?!

    Good afternoon. How can I proceed to free the memory allocated to tmp?



    /*
    * File: memswap.cpp
    * Author: thames
    *
    * Created on 7 de Janeiro de 2013, 14:46
    */
  22. Make a friend the whole WindowMgr Can this...

    Make a friend the whole WindowMgr

    Can this lead to further problems?
  23. I modified WindowMgr including two constructors...

    I modified WindowMgr including two constructors with member initialization lists and a Set function for screens:



    #ifndef SCREEN00_H_
    #define SCREEN00_H_

    #include <string>
    #include...
  24. because you attempt to use an incomplete type ...

    because you attempt to use an incomplete type

    What's an incomplete type?

    I wrote the header like this now (just putting the forward declaration before WindowMgr):

    I didn't move screens...
  25. What do you mean, put WindowMgr before Screen?...

    What do you mean, put WindowMgr before Screen? yes, I did. However, Screen is not recognized as a type inside vector.
Results 1 to 25 of 193
Page 1 of 8 1 2 3 4