Thanks for the replies, and that's an interesting note regarding Lisp since I'm not familiar with it at all.
As far as the
method_call macro, the intention was to have the macro pass in the...
Type: Posts; User: Eclipse07
Thanks for the replies, and that's an interesting note regarding Lisp since I'm not familiar with it at all.
As far as the
method_call macro, the intention was to have the macro pass in the...
Hi all,
I've just been trying to solidify my understanding of OO techniques and how C can be used to implement things like "methods" from higher-level object-oriented languages that operate on the...
Ok, well thanks for the reply.
I think you're probably right about the library implementation using the rightmost bits for some specific purpose, maybe to indicate some aspect of the type. Hadn't...
Hi all,
I understand that the left and right shift (<<, >>) operators shift bits around but can someone give me an example of when we would want to do this? I've read that left shift is equivalent...
True about the quality thing. I think I do understand the casting part, and how emsg is effectively *msg itself address-wise (but cast to another structure type with members). So if that is in fact...
Thanks anduril462, you seem really knowledgeable. I guess the reason I started this thread was because, since I'm learning that when you cast an address to be a specific pointer type, that structure...
I see. Thanks for the input. But even if they cast it to another type before freeing it, if free will accept it as a void * anyway, how would alignment or anything else matter?
Hi all,
I came across some code and it's not clear why it is casting an unsigned char * to another pointer type only to free it right after.
Here are the relevant structures:
struct...
Remember that a boolean variable does not hold a string. It holds a value REPRESENTING true or false. So you can print it be testing the variable with an if/else statement and printing the right...
void functions don't return a value. But you can simulate a return value by passing in pointers and modifying them. If you just want to terminate the program then what the others have said should...
A few months ago I posted about a text editor i've been writing. I actually rewrote the entire application and fixed some design issues and it is much more stable now. This could be considered...
Yeah i've heard of Glade although I wish there were actually good books that go through it in detail. I'm always surprised that even though GTK is the basis for so much of Linux that documentation...
So i've been writing a graphical text editor under Linux with the GTK+ libraries. Initially this project grew out of my experimenting with the toolbar, menubar and textbuffer/textview widgets. It's...
This might help you out:
#include <stdio.h>
#define MAXLINE 127
#define TRUE 1
You may want to study this:
#include <stdio.h>
int main(int argc, char **argv)
{
FILE *fp;
char text[80];