Search:

Type: Posts; User: grumpy

Page 1 of 20 1 2 3 4

Search: Search took 0.04 seconds.

  1. Replies
    38
    Views
    2,314

    Given that is your starting point for your post,...

    Given that is your starting point for your post, I haven't bothered to read further, so have no idea if there is any merit in your post or not.

    Not to matter. I've been tiring of this site...
  2. Replies
    38
    Views
    2,314

    Not really. The context in which an I/O error...

    Not really. The context in which an I/O error is critical is in its context of use, not in the act of doing I/O.

    It is possible to recover from finding that a file does not exist (e.g. by...
  3. Replies
    8
    Views
    734

    It is probably fairer to say it is a concern with...

    It is probably fairer to say it is a concern with quality of implementation of the compiler (i.e. what diagnostics it produces) rather than compiler installation.

    sizeof is rather unique in C as...
  4. Thread: operator new

    by grumpy
    Replies
    8
    Views
    611

    Writing beyond the extent of any allocated memory...

    Writing beyond the extent of any allocated memory can crash your program. It doesn't matter if that memory is categorised as heap, stack, virtual, physical, or anything else. Similarly, it...
  5. Replies
    6
    Views
    758

    Oh, rubbish. All real-world programming...

    Oh, rubbish. All real-world programming languages have practical limitations, including whatever favourite language of yours that works as you suggest. Yes, there are programming languages that...
  6. Replies
    6
    Views
    758

    Arrays can't be assigned. They can only be...

    Arrays can't be assigned.

    They can only be initialised at the point of definition (i.e. line 3 in your code). After that, elements need to be assigned individually (e.g. in a loop) or values of...
  7. Replies
    6
    Views
    722

    Typedefs wouldn't work in all cases. Consider...

    Typedefs wouldn't work in all cases.

    Consider what would happen if it was decided to use a "huge int" type (say a class named huge_int_type). Even if the implementer of such a type was to...
  8. Replies
    38
    Views
    2,314

    If libraries need to do that, I would suggest...

    If libraries need to do that, I would suggest that their error handling strategy isn't properly sorted out.

    Generally speaking, I will use error codes to report recoverable status information. ...
  9. Replies
    6
    Views
    722

    Yeah, but I wouldn't use such a thing, since it...

    Yeah, but I wouldn't use such a thing, since it bakes in type specific dependencies. Picture what would need to be done if, for some reason, the variables need to be changed so they are of some...
  10. Replies
    3
    Views
    537

    "sum += array[i++]" is an example of an...

    "sum += array[i++]" is an example of an expression with multiple side effects (i.e. changing more than one value): it evaluates i, accesses array[i], it changes i, it changes sum.

    As a general...
  11. Replies
    6
    Views
    785

    Since sizeof(y) is 24, the only way the total...

    Since sizeof(y) is 24, the only way the total could be 44 would be if an int (member named b) had size zero. Which is not possible.
  12. Replies
    23
    Views
    1,216

    If VC++ gives a compiler error, then it is doing...

    If VC++ gives a compiler error, then it is doing the right thing. sizeof() is not valid on incomplete types.
  13. Replies
    4
    Views
    648

    Wrong question. Infinity is not represented by...

    Wrong question. Infinity is not represented by a type. It is represented as a special value of a type (particularly a numeric type) if it is represented at all.

    The output streaming operators...
  14. Replies
    3
    Views
    831

    Which witch? Assuming you have specified...

    Which witch?

    Assuming you have specified main() in the form "int main(int argc, char **argv)" form, look at argv[0] first. While it is not guaranteed to contain the complete path of your...
  15. Thread: Server downtime

    by grumpy
    Replies
    41
    Views
    2,436

    13898

    13898
  16. Thread: Server downtime

    by grumpy
    Replies
    41
    Views
    2,436

    Who said I was taking anything seriously?

    Who said I was taking anything seriously?
  17. That's a bit of an exaggeration. The...

    That's a bit of an exaggeration. The philosophy in the standardisation process is to avoid overhead of features within a program unless those features are used. They will accept overhead if...
  18. Replies
    4
    Views
    811

    The error() function provided by that sample...

    The error() function provided by that sample (from Stroustrup) throws an exception. If an exception is not caught, std::terminate() is called. std::terminate(), by default, calls abort(). Your...
  19. Thread: Server downtime

    by grumpy
    Replies
    41
    Views
    2,436

    I do .... but I don't typically watch shows about...

    I do .... but I don't typically watch shows about programmers, nerds, or geeks.


    Although (gasp!) I confess to developing software on occasion, I've never claimed to be a programmer ;) I...
  20. Thread: Server downtime

    by grumpy
    Replies
    41
    Views
    2,436

    It wasn't a paper weight. It was actually a...

    It wasn't a paper weight. It was actually a pair of 20 kg kettlebells. I'd just finished a quick series of reps, was a bit tired and lazy, and didn't apply good technique to put one of them down....
  21. Replies
    23
    Views
    1,216

    T is known for every instantiation of the...

    T is known for every instantiation of the template. That includes for all member functions of a template class, including copy constructors.
  22. Thread: Server downtime

    by grumpy
    Replies
    41
    Views
    2,436

    Girls, hopefully without too much doping, are...

    Girls, hopefully without too much doping, are much more interesting on a date than FETs. If less predictable.
  23. Replies
    23
    Views
    1,216

    I'd use type traits. If you're using C++11,...

    I'd use type traits. If you're using C++11, look up std::is_copy_constructible() and std::is_copy_assignable() in <type_traits>.

    These are compile time tests.
  24. Thread: Server downtime

    by grumpy
    Replies
    41
    Views
    2,436

    John, there are horizons offline too. Not...

    John, there are horizons offline too. Not all means of interaction involve transistors.
  25. Replies
    8
    Views
    746

    Can't do that in C. Arrays, pointers, and...

    Can't do that in C.

    Arrays, pointers, and structs are not interchangeable, so array syntax cannot be used to access information from a struct.


    Unrelated to your question, main() returns int,...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4