Search:

Type: Posts; User: Slacker

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    3,495

    >What could be causing this?? It sounds like the...

    >What could be causing this??
    It sounds like the Enter key got stuck in your stream. :) When you use fgetc or any of its buddies to read a single character, the stream actually gets two characters...
  2. >I really thought it got easier after grasping...

    >I really thought it got easier after grasping pointers and data types.
    Not really. :D It's like math. Once you grasp arithmetic they throw algebra at you, and once you finally get algebra, you get...
  3. lpp is a pointer to a pointer to struct list, but...

    lpp is a pointer to a pointer to struct list, but presumably the next pointer is just a pointer to struct list, so the first thing that needs to be done is be able to get to the members by...
  4. Replies
    6
    Views
    2,263

    >http://www.daniweb.com/code/snippet148.html...

    >http://www.daniweb.com/code/snippet148.html
    Heheh, cop out. :p

    That's about what I was thinking, though it doesn't accurately give you the value bits for a signed type. If you use one of the MAX...
  5. Replies
    6
    Views
    2,263

    >an int may contain padding bits. Sorry Mr....

    >an int may contain padding bits.
    Sorry Mr. Sinkula, but I'm not going to let you off the hook that easily. :) I believe that you're talking about trap representations and how the number of...
  6. Replies
    1
    Views
    1,381

    int** and int (*)[N] are completely different. I...

    int** and int (*)[N] are completely different. I like to stay upbeat and avoid being too negative when I describe stuff, but this is one situation where you just can't trick the compiler into being...
  7. Replies
    6
    Views
    5,176

    >Another legitimate place for a type cast is when...

    >Another legitimate place for a type cast is when converting a void * to a known type or vica-versa
    Only if you're using a REALLY old compiler, or C++. C has allowed implicit conversions to and from...
  8. Thread: ios::binary

    by Slacker
    Replies
    8
    Views
    2,115

    Well, Linux people are always trying to convert...

    Well, Linux people are always trying to convert non-Linux people, so being anti-social is against the cult creed, I think. :p
  9. Thread: ios::binary

    by Slacker
    Replies
    8
    Views
    2,115

    >what would you recommend using with file io,...

    >what would you recommend using with file io, binary or text mode
    Text is easier to work with and more portable, so it's usually what I use. But since you're learning, work with both to get a feel...
  10. Thread: for( ; ;)

    by Slacker
    Replies
    3
    Views
    1,161

    Well, for(;; ) is technically always true, so it...

    Well, for(;; ) is technically always true, so it doesn't matter. :) But in general, conditional tests by default test for != 0. That's why


    if ( x ) {
    /* Stuff */
    }

    Executes the block if x...
  11. Thread: Maths problem

    by Slacker
    Replies
    3
    Views
    1,011

    The result of a%b is the remainder of a/b.

    The result of a%b is the remainder of a/b.
  12. Thread: fflush(stdin)

    by Slacker
    Replies
    23
    Views
    8,018

    >i really don't see the problem with it if the...

    >i really don't see the problem with it if the program is written in a personal context
    As long as it actually works (ie. documented on your compiler) and nobody sees you use it, there isn't a...
  13. Thread: ios::binary

    by Slacker
    Replies
    8
    Views
    2,115

    But it's still recommended. Otherwise when good,...

    But it's still recommended. Otherwise when good, useful code is ported to another system--you do write good, useful code, right? :)--forgetting to add the binary orientation could cause some...
  14. Replies
    12
    Views
    2,475

    Pair Networks. Their first non-FTP package is...

    Pair Networks. Their first non-FTP package is like $5.95US, their hosting rocks and they have great service. :)
  15. Replies
    385
    Views
    667,850

    Sticky: >I'll read a few, and reply to one, and suddenly...

    >I'll read a few, and reply to one, and suddenly none of the threads on the entire site are unread.
    How long do you read or reply without previewing or refreshing the page? I've noticed that if you...
  16. Thread: ios::binary

    by Slacker
    Replies
    8
    Views
    2,115

    >how do you input strings into a buffer while in...

    >how do you input strings into a buffer while in binary mode
    The same way you do in text mode. The only difference is that text conversions aren't made, so if the file has a CR LF pair that's...
  17. Replies
    5
    Views
    1,162

    >when you make the switch to C++ you have bad...

    >when you make the switch to C++ you have bad habbits from prgramming in C
    And vice versa. :) C and C++ idioms are different enough that you'll have issues no matter which you start with. Just pick...
  18. Replies
    1
    Views
    5,749

    const char *content[] = { "echo reply", ...

    const char *content[] = {
    "echo reply",
    "unassigned",
    "unassigned",
    "destination unreachable",
    "source quench"
    ... and so on until 255
    };

    ...
  19. Replies
    7
    Views
    1,089

    >error C3861: 'time': identifier not found That...

    >error C3861: 'time': identifier not found
    That program had a bug in that it didn't include time.h. That usually ends up working in C, but fails miserably in C++ because C++ requires a prototype.
  20. >i have the ebook and its the second edition K&R...

    >i have the ebook and its the second edition
    K&R isn't available electronically. You're reading a pirated copy that's probably filled with typos and errors, unlike the actual printed book.

    Cheers!
  21. Replies
    15
    Views
    10,612

    >How did you master pointers? Heheh, master...

    >How did you master pointers?
    Heheh, master pointers. :rolleyes: :p Some people might tell you that I've mastered pointers, but some people will say anything. ;) Personally, I don't think it's...
  22. Replies
    3
    Views
    1,432

    >Is the part in red necessary if I exit the...

    >Is the part in red necessary if I exit the program right after displaying the error message?
    Necessary? Nope. :) But it's definitely a good idea, especially since nobody tries to write bad code,...
  23. Replies
    10
    Views
    2,882

    >so the problem is how to insert the text using...

    >so the problem is how to insert the text using C.
    You need to rewrite the entire file, inserting the lines you want as necessary during the rewrite. Unless your system supports record oriented...
  24. >That's not really a very strong claim. Neither...

    >That's not really a very strong claim.
    Neither is yours. :) NULL is another way to say 0, so that part of the example is pretty silly. '\0' is also another way to say 0, a char is really a small...
  25. >even though it's a function? Yep, only the...

    >even though it's a function?
    Yep, only the first dimension can be omitted because the "array names become a pointer to the first element" rule only applies to the first dimension of a...
Results 1 to 25 of 117
Page 1 of 5 1 2 3 4