Download now Free registration required
Another C++0x feature is going to simplify the way one writes C++ code. Instead of tediously writing the type of a variable when one declares it, a C++0x compiler will deduce the variable's type automatically simply by looking at its initializer - if one ask it to. The following sections will demonstrate how to use this feature. Problem: Declaring the type of certain variables (for example, iterators) leads to code clutter and maintenance difficulties. Solution: Use the revamped auto keyword to let the compiler automatically deduce a variable's type from its initializer.
- Format: HTML
- Size: 0 KB