Sunday, February 9, 2014

C++ Gems

1.  Use of Initialization lists in C++

Why is a colon (:) used after a constructor definition in c++ ?

http://www.cprogramming.com/tutorial/initialization-lists-c++.html

2. Use of const after a function definition in c++   (Mutable fields )


http://www.parashift.com/c++-faq-lite/const-member-fns.html

http://msdn.microsoft.com/en-us/library/4h2h0ktk.aspx


3. Scope Resolution Operator

http://en.wikipedia.org/wiki/Scope_resolution_operator

4. Constructors and Destructors  -

A crisp article explaining constructors with and without initialization lists and destructors.

http://www.tutorialspoint.com/cplusplus/cpp_constructor_destructor.htm


5. Virtual Functions


http://www.learncpp.com/cpp-tutorial/122-virtual-functions/

 

6. Printf format specifiers 

a)  A complete list of the specifiers to be used for decimals, integer types etc.

http://www.cplusplus.com/reference/cstdio/printf/ 

b) An example showing usage of the decimal format specifier.
For example, to print a double value  upto 5 decimal places, use %0.5f

http://stackoverflow.com/questions/9999221/double-precision-decimal-places 

  7. Online C++ compile and execute


No comments:

Post a Comment