Search:

Type: Posts; User: Eclipse07

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    6,108

    Thanks for the replies, and that's an interesting...

    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...
  2. Replies
    6
    Views
    6,108

    Simulating OO "methods" in plain C

    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...
  3. Replies
    4
    Views
    6,235

    Ok, well thanks for the reply. I think you're...

    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...
  4. Replies
    4
    Views
    6,235

    Left and right shift operators

    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...
  5. Replies
    14
    Views
    1,968

    True about the quality thing. I think I do...

    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...
  6. Replies
    14
    Views
    1,968

    Thanks anduril462, you seem really knowledgeable....

    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...
  7. Replies
    14
    Views
    1,968

    I see. Thanks for the input. But even if they...

    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?
  8. Replies
    14
    Views
    1,968

    Help with pointer type casting

    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...
  9. Remember that a boolean variable does not hold a...

    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...
  10. Replies
    17
    Views
    2,589

    void functions don't return a value. But you can...

    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...
  11. Replies
    3
    Views
    1,532

    Revised GTK+ Text Editor (more stable)

    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...
  12. Replies
    3
    Views
    6,287

    Yeah i've heard of Glade although I wish there...

    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...
  13. Replies
    3
    Views
    6,287

    Graphical Text Editor (GTK+)

    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...
  14. Replies
    2
    Views
    1,094

    This might help you out: #include...

    This might help you out:




    #include <stdio.h>

    #define MAXLINE 127

    #define TRUE 1
  15. Replies
    4
    Views
    940

    Fopen

    You may want to study this:



    #include <stdio.h>

    int main(int argc, char **argv)
    {
    FILE *fp;
    char text[80];
Results 1 to 15 of 15