P
Paul Hsieh
Mark A. Odell said:You *shouldn't* use malloc in C++!
Why not? What if you wish to explictely make sure constructors are
not invoked for all entries? I don't think "new" has an option where
you can turn this off.
True but this is not a style issue.
No, its a language weakness issue. One of the few good things to come
out of the C99 spec is the adoption of C++'s requirement for
prototype, and not assuming the default: int ()(int) . But since the
OP in highly unlikely to have practical access to a C99 compiler
within the next 5 years, the simpler solution is simply to compile
with C++ (after making your code C++ safe, of course) to catch these
and other kinds of errors.