devxlogo

C C++

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

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

Prepare Yourself for the Unicode Revolution

++98 has two native character types: char and wchar_t. The latter is purportedly used for manipulating Unicode strings. In reality however, wchar_t is unsuitable for this purpose. The C++09 standard

The Art of Daylight Savings Time

A month ago, I discussed the strfmt() function. A timely announcement from Microsoft has inspired me to write a column about a related topic, namely accessing the system’s Daylight Saving

Minimize Date and Time Display Drudgery

any moons ago, I presented C++’s basic time and date facilities. At that time, however, I didn’t demonstrate how to format and customize the date and time. Such customizations may

Tackling the Conundrums of Constant Expressions

onstant expressions are tricky. Not all of them have an overt const qualifier. Furthermore, in some cases, a const-qualified variable is just a constant, but not a constant expression. These