RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Uniform and Convenient Initialization Syntax

Not only does C++98 have four different syntactic forms for initializing class objects, aggregates, char arrays and scalar types, it doesn't let you initialize member arrays and dynamically allocated arrays at all. Learn how C++0x fixes these flaws with a uniform and intuitive initialization syntax.

lass objects use a constructor argument list as their initializer, aggregates use braces, strings use literal text with double quotes, and containers use yet another form of initialization. These diverse initialization forms confuse users and make template code more obfuscated, not to mention the fact that C++98 doesn't provide a means for initializing member arrays and dynamically-allocated arrays. Learn how C++0x's new initialization notation fixes these embarrassments, making your code safer and easier to read and maintain.

C++98 initialization syntax is confusing, inconsistent, and lacking.

Use the new, uniform C++0x initialization form for all types of objects and arrays.

Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date