Negative tive C ++ Reading Notes (45-50): Miscellaneous Discussion

Source: Internet
Author: User
Item45 -- clearly knows which functions the C ++ compiler silently completes and calls for us

Constructor, copy constructor, destructor, assignment, and address Retrieval

Item46 -- I would rather encounter errors during compilation and connection than execution.

Abstract A month into a class. The class mechanism allows you to discover errors during compilation and connection. This is a little too advanced and generally not used. Ignore.

Item47 -- before using non-local static objects, determine whether it has an initial value.

You can use the single-key mode to resolve this issue. When the function is used to declare a static variable, it is initialized when it is used for the first time and then obtained directly.
Item48 -- do not view the warning information of the compiler as missing
C ++ is really a difficult language, so we can only remember one of the following cases.

Class B {

Public:

Virtual void F () const;

};

Class D: Public B {

Public:

Virtual void F ();

};

Warning: D: F () hides virtual B: F ()

This compilation error indicates that F () in B is masked, and const B * pb cannot be used to call the F () function.

Item49 -- try to familiarize yourself with the c ++ Standard Program Library

No, STL should be familiar. This is a long way to go. Now, we mainly refer to the reference of www.cplusplus.com.
If you have time, you will also want to read some books such as objective STL and STL source code analysis.

Item50-enhance your understanding of C ++

I want to read two books, the design and evolution of C ++, the annotated C ++ Reference Manual
Now let's take a look at the basics and time.

 

Postscript:

Objective C ++ has been read for a long time, but now it is worth looking back and reading many things again. I think it is a necessary book to study c ++ in depth, scott Mayers is very familiar with many details. He can tell all his thoughts in this book in his own words, which is easy to understand, therefore, C ++ is proficient, and now it is only a rough record of what you think, so this goal is worth years of effort.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.