Search:

Type: Posts; User: \007

Page 1 of 9 1 2 3 4

Search: Search took 0.01 seconds.

  1. Yes, I ball parked those numbers but they are...

    Yes, I ball parked those numbers but they are generally the truth. If we look at books like The C++ Programming Language compared to The C Programming Language, or other books that go through the...
  2. I view C as having a smaller foundation than the...

    I view C as having a smaller foundation than the alternatives. If you pick up a C book you go home with a 200-250 page book. If you take home a C++ book you go home with 1400 pages.

    If you want...
  3. C is fantastic to learn first because it is a...

    C is fantastic to learn first because it is a pretty small language. There isn't a lot of extra functionality. You can learn how to program because you are given all the necessities and nothing more.
  4. Replies
    8
    Views
    1,717

    You can also use void pointers to get around...

    You can also use void pointers to get around type-safety. It's like playing Russian roulette.
  5. Replies
    6
    Views
    6,600

    #include #include int...

    #include <signal.h>
    #include <unistd.h>
    int main(void)
    {
    sleep(3);
    raise(9);
    for (;;)
    ; /* infinite loop*/
    return 0;
    }
  6. Replies
    7
    Views
    1,785

    edit: misread! See above post.

    edit: misread!

    See above post.
  7. Replies
    32
    Views
    2,726

    Yes, I rather place it inside the loop's scope...

    Yes, I rather place it inside the loop's scope but C89 wouldn't allow that. It was just an overly simple example.
  8. Replies
    5
    Views
    2,995

    Check out the ncurses library.

    Check out the ncurses library.
  9. I would suggest a combination of ideas. I...

    I would suggest a combination of ideas.

    I would use the variable length argument list as linked to above.

    I would also use a method similar to how I coded but instead of building a whole...
  10. Replies
    6
    Views
    1,741

    While you're at it, you don't need to put ()...

    While you're at it, you don't need to put () around the return value in this case



    return 0;

    Will work just wonderful.
  11. Replies
    32
    Views
    2,726

    Once again, you don't put declarations randomly...

    Once again, you don't put declarations randomly or scattered at all. You choose the most logical location that is close to the use of it.

    The objective is to not have code like this:



    int...
  12. This was quick and dirty, but I hope it makes...

    This was quick and dirty, but I hope it makes sense. You could expand on something like this.. I think it works like you described.


    #include <stdio.h>
    #include <stdlib.h> /* malloc() */
    ...
  13. I would suggest using an expanding array based...

    I would suggest using an expanding array based stack implementation. You can drop the pop function if you don't need it. Simply use a push function with a variable length of integers as arguments....
  14. Replies
    32
    Views
    2,726

    I feel like you understand what I have been...

    I feel like you understand what I have been saying. I don't know why Quzah isn't getting it.

    For now on, I will just suggest people read a good styles book-- such as Code Complete.
  15. Replies
    32
    Views
    2,726

    The old style is old for a reason. A better style...

    The old style is old for a reason. A better style was developed~ there is documented proof that improvements in style formats like declaring variables close to the initial use drives down possible...
  16. Replies
    32
    Views
    2,726

    General style tips: * limit your source code...

    General style tips:

    * limit your source code to 80 characters per line

    * don't linear declare a bunch of variables. It's better to declare a variable as close to where it's used as possible and...
  17. Replies
    32
    Views
    2,726

    Only the first statement after an if clause will...

    Only the first statement after an if clause will count as part of the if clause. You need to wrap brackets around the entire block if it's more than 1 line. Else goes outside the closing brackets.
    ...
  18. Replies
    12
    Views
    4,088

    First off I don't see how you can establish...

    First off I don't see how you can establish private anything in C. Of course you could use static to try an lock down some variables to the source file itself.

    Secondly, why use all those nasty...
  19. Replies
    16
    Views
    9,534

    Use an assembler to produce the binary file from...

    Use an assembler to produce the binary file from the asm?
  20. Replies
    6
    Views
    1,508

    Just a tip-- I would be a little careful using...

    Just a tip-- I would be a little careful using the name typeof in a C program. It has a special meaning and adding it to a variable name can be a little misleading. I would possibly rename them...
  21. thanks

    Thanks-- lots of great replies.

    I also think C isn't a great choice for data types like this-- and I am not entirely sure how useful they would be.

    I also believe if you need structures like...
  22. A generic/polymorphic stack implementation in plain C

    I rather enjoy generic data structures in object oriented languages. After programming in an object oriented language for a while I decided to re-fresh some of my C skills by attempting to implement...
  23. Replies
    6
    Views
    4,909

    Thanks-- I am still new to the idea of abstract...

    Thanks-- I am still new to the idea of abstract classes. I am slowly gaining quite the appreciation for the standard library and how everything goes together so well. I hope I can make classes and...
  24. Statically compiled or dynamic? What kinds of...

    Statically compiled or dynamic? What kinds of libraries were used etc? I guess the answer is, "It depends."
  25. Replies
    6
    Views
    4,909

    Thanks, I will play a bit with interfaces. I...

    Thanks, I will play a bit with interfaces.

    I have heard of design patterns but haven't read much about them yet. I have read a bit of a design patterns book but at the time I hadn't done much OOP...
Results 1 to 25 of 213
Page 1 of 9 1 2 3 4