441.How are C++ objects laid out in memory?
442.Why is "this" not a reference?
443.I have some code containing expressions like a ? b = c : dand some compilers are accepting it but some are not.
444.Why is the size of an empty class not zero?
445.Why doesn't C++ have a final keyword?
446.What does the warning ``semantics of `>' change in ANSI C'' mean?
447..How do I define an in-class constant?
448.I'm trying to declare a pointer and allocate some space for it, but it's not working. What's wrong with this code? char *p; *p = malloc(10);
449.How can I implement opaque (abstract) data types in C?
450..How do you pronounce "char"?
451.why use sort() when we have "good old qsort()"?
452.How can I understand complex expressions like the ones in this section, and avoid writing undefined ones? What's a ``sequence point''?
454.Do we really need multiple inheritance?
454.Why can't I define constraints for my template parameters?
455.Why doesn't overloading work for derived classes?
456.How do I deal with memory leaks?
457.Why doesn't C++ provide heterogenous containers?
458.Why doesn't delete zero out its operand?
459.Why doesn't C++ have a universal class Object?
460..How do I call a C function from C++?
461.But what about the && and || operators?
I see code like ``while((c = getchar()) != EOF && c != '\n')'' ...
462.How do you pronounce "cout"?
464.So if I write a[i] = i++;and I don't care which cell of a[] gets written to, the code is fine, and i gets incremented by one, right?
464.Here's a slick expression: a ^= b ^= a ^= bIt swaps a and b without using a temporary.
465.Why don't we have virtual constructors?
466..I have a complicated expression which I have to assign to one of two variables, depending on a condition. Can I use code like this? ((condition) ? a : b) = complicated_expression;
467.What good is static_cast?
468.How do I use exceptions?
469.Under my compiler, the code int i = 7; printf("%d\n", i++ * i++);prints 49. Regardless of the order of evaluation, shouldn't it print 56?
470.Why doesn't C++ provide a "finally" construct?
471.Why doesn't this code: a[i] = i++;work?
472..Why can't I overload dot, ::, sizeof, etc.?
474.Why do people use explicit masks and bit-twiddling code so much, instead of declaring bit-fields?
474.Can I define my own operators?
475Can I call a virtual function from a constructor?
476.Should I use NULL or 0?
477.Is there a "placement delete"?
478.So, what's wrong with using macros?
479.I need to check whether one number lies between two others. Why doesn't if(a < b < c)work?
480.How do you name variables? Do you recommend "Hungarian"?
Page 12
|