Login | Register   
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
 

Mastering Class Member Initialization

You know initialization is imperative for high-performing applications, but class members refuse to follow the standard rules. By learning the rules—and the exceptions—of initialization, you'll always know what methods to use and when.


advertisement
n a previous column I explained the rules of POD initialization. The rules of class member initialization are radically different, due to the fact that, in certain contexts, member initialization is mandatory. In addition, class constants have a wide range of initialization forms, depending on their type. The following sections shed some light on the intricate rules of class member initialization and show how to avoid common bugs and inefficiencies.


How do you initialize class members that require explicit initialization? How do you define class constants?


Distinguish between assignment and initialization. Use the appropriate initialization form according to the members type.



Comment and Contribute

 

 

 

 

 


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

 

 

Sitemap