C++ Zone

The Good Parasite Class Explained

y recent C++ 10-Minute Solution titled “Using a Good Parasite Class to Design a Self-Clearing Memory Buffer” was greeted with skepticism, raised eyebrows, and a torrent of questions from readers

There’s More to Typecasting than C++ Cast Operators

xplicit typecasting is considered are an abomination in object-oriented programming. However, prudery won’t change the fact that casts are still a widely-used feature in C++ programming. Therefore, knowing exactly which

Using High-resolution Timers

tandard C++ offers a rather limited number of functions for accurate time measurement: clock() gives you a granularity of up to a thousandth of a second at best, and difftime()

Dealing with Floating-point Exceptions in MSVC78

ecause the scientific and engineering numeric floating-point calculation approximates real arithmetic, the precision of this format can create situations wherein your floating-point operations results are not acceptable in some domains.

A Guide to C++ and C Interoperability

orting C code to C++ is no big deal: change the source file’s extension from .c to .cpp and recompile. By contrast, porting C++ source code and binaries to C