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...
Type: Posts; User: thames
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...
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!
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...
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>...
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?
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 =...
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) {
...
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
*
*...
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.
Now I'm a bit lost. How can the head be the top (the first popped element) of the stack?
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...
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...
I see! many thanks!
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 =...
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...
In fact, I was just trying to understand the codes from Mastering Algorithms With C.
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...
ok :eek:
the original C code:
/*
* File: memswap.c
* Author: thames
*
haha ;)
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...
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
*/
Make a friend the whole WindowMgr
Can this lead to further problems?
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...
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...
What do you mean, put WindowMgr before Screen? yes, I did. However, Screen is not recognized as a type inside vector.