devxlogo

Recent

DevX - Software Development Resource

Complex Arithmetic Without Complexities

omplex numbers are widely-used in electrical engineering, simulations, and scientific applications. And yet, many software engineers who have to use complex arithmetic insist on reinventing the wheel when there’s no

DevX - Software Development Resource

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

DevX - Software Development Resource

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()

DevX - Software Development Resource

nullptr: A Type-safe and Clear-Cut Null Pointer

he new C++09 nullptr keyword designates an rvalue constant that serves as a universal null pointer literal, replacing the buggy and weakly-typed literal 0 and the infamous NULL macro. nullptr

DevX - Software Development Resource

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.

DevX - Software Development Resource

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

DevX - Software Development Resource

Error Handling: The Sooner, The Better

rrors and exceptionsare two similar notions that differ in one crucial aspect: exceptions are a runtime concept, whereas errors are anomalous conditions that can and should be detected as early

DevX - Software Development Resource

Move Semantics: Make Your Next Move

opy construction, assignment, container reallocation, string concatenation, and string copying are all instances of copy operations. However, in recent years a new paradigm is emerging: move semantics. This discussion presents