Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

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.


advertisement
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.





Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap