C++ Zone

Pointers: Advanced Concepts in C++

A pointer is a variable that points to the memory location of another variable or an object. The pointer itself is also a variable???the difference between a pointer and another variable, or an object, is that while a variable or an object contains data, a pointer contains an address or

Using Preprocessor Directives in C++

Preprocessors are programs that accept input and produce output that in turn becomes input for the next cycle. Preprocessor directives are statements in a program that are preceded by the hash sign (#). Such directives facilitate portability and conditional compilation of your source code. In this article we will explore

Embarcadero Rolls Out Entry-level RAD Kits

Entry-level rapid application development (RAD) tools have a deserved reputation for being low-grade, or robust and expensive, or free and missing key ingredients. At the same time, there is a pent-up demand for such tools from a host of folks — beginner developers, students, small development shops, non-profits, startups, and

Overriding Virtual Functions? Use C++0x Attributes to Avoid Bugs.

n July 2009, the C++ standards committee voted into the C++0x Working Paper new attribute tokens that regulate the overriding of virtual functions in a derived class. These new attributes ensure that an overriding function matches its base class counterpart by signature and name. As trivial as it may seem,

Avoiding the Perils of C++0x Data Races

ace conditions are an inherent part of parallel programming. A race condition exists any time a program’s behavior may depend on the relative ordering of events on separate threads. In the vast majority of cases, race conditions are harmless?the program works regardless of which thread gets a lock first, or

C++0x Forward Enum Declarations Cut Down Compilation Time and Dependencies

very declaration of an enum type must be a complete definition containing a full list of its enumerators. However, in some use cases declaring an enumeration without providing the enumerators list is desirable. For example, you may use a forward declaration like this… enum class Direction; …instead of repeating the

Bjarne Stroustrup Expounds on Concepts and the Future of C++

?year ago, everyone was all but certain that the C++0x standard was just around the corner, and that it would include concepts (see Danny Kalev’s earlier interview with Bjarne Stroustrup, the creator of C++, from August 2008). However, In July 2009 the C++ standards committee decided to remove concepts from

The Rise and Fall of C++0x Concepts

hat were you doing during the morning hours (EST) of July 13th 2009? On that auspicious day, in a dramatic vote, the C++ standards committee decided to remove concepts from C++0x. Undoubtedly, this resolution will have a huge impact on C++. In this column I will outline the causes of

std::array: The Secure, Convenient Option for Fixed-Sized Sequences

hen implementing a sequence of elements that needs to grow and shrink dynamically, std::vector is a fine choice. It provides the convenience of a standard container class, including automatic memory management, random access to elements, a uniform interface, and compatibility with standard algorithms. However, for a sequence whose size is

No more posts to show