Content in the preface:1. what is the C + + object model? 1. The part of the language that directly supports object-oriented programming2. The underlying implementation mechanism for various support2. The complete virtual functions of C + +
1. Ode value operatorFirst, the value operator introduces the operator overloads to be said later. The previous section describes constructors, copy constructors, and a class that wants better control. You need to define your own constructors, copy
1. Waiting for thread to finishWithout waiting for the thread to complete, we need to make sure that the data that the thread accesses is valid until the thread finishes. For example, the thread function holds a pointer or reference to a local
The father of Linux is not rough-CvsC ++-general Linux technology-Linux programming and kernel information. The following is a detailed description. Linus Torvalds tried to use C ++ to develop the Linux kernel more than a decade ago. due to various
A new type, the Rvalue reference (R-value Reference), is added to the c++11, marked as t&&. And its purpose is to eliminate unnecessary deep copies and improve performance.The concept of something is not much to say. Use code directly to demonstrate
Today we're talking about the introduction of two new things in c++11.1.move Constructor (move constructor)2.MoveAssignment (mobile assignment) rule of three now becomes rule of five (more than two above) Class rule_of_five{char* CString;//raw
Document directory
Iii. Resource Management
Provide a way to access the original resources. There are two advantages to doing so:
I. What is raiI?
RaiI (resource acquisition is initialization) -- "initialization upon resource acquisition ". This
There are too many things. It is necessary to stop and take a closer look at several basic template classes. Here, let's take a look at the add_value _ * template first.
template struct add_value_2{ typedef boost::arg type;};template struct
They are not. Probably "compared to what? "Is a more useful answer. When people complain about standard-library container performance, I usually find one of three genuine problems (or one of the following myths and red herrings ):
I suffer copy
The C ++ programming language (Special
Edition.
Chapter 1 to readers[1] When writing a program, you are creating a specific idea for your solution to a problem.
. Let the program structure reflect these ideas as directly as possible:[A] If you can
Reprinted please indicate the source: blog.csdn.net/zhangxingpingAttribute Declaration
The attribute Declaration uses the keyword @ property. The attribute declaration can be any part of the method declaration block in the @ interface class. @
Class 1 initialization most classes provide a special default constructor which does not need to specify the initial value. In typical cases, if the class object is initialized by the default constructor, we can consider it not initialized yet.
Introduction
In C ++, pod is an extremely important concept. To understand the pod type, we must first understand the aggregate type. According to the answer in stackoverflow, we will give a comprehensive explanation of the aggregate type.Definition
1. Make yourself accustomed to C ++
Item1. regard C ++ as a Language Federation.
C ++ consists of the following parts: C, object-oriented C ++, template C ++, STL
Item2. replace const, Enum, and inline as much as possible # define
Item3. use
Paste one: http://blog.csdn.net/ACb0y/archive/2011/02/11/6179167.aspx
2: http://kmplayer.iteye.com/blog/674710
The above is part of it.
For C ++ classes with virtual functions, the compiler does the following:
1.
By default, a virtual
1. Basic concepts:
First, we should know what deep copy and shallow copy are ).
A. Shallow copy Shadow Clone: only copies the basic type of the object. The object type still belongs to the original reference.B. Deep copy (deep copy): Copies the
Right-value reference (and supported move semantics and perfect forwarding) is one of the most important language features C ++ 0x will add, this can be seen from the proposal of this feature ranking first in the C ++-state of the evolution list.
Two methods to disable copy construction:
1. Macro:(From Chrome)// A macro to disallow the copy constructor and operator = Functions// This shoshould be used in the private: declarations for a class# Define disallow_copy_and_assign (typename
(1) The variables on the stack must be initialized.
(2) memory allocated from the stack must be initialized.
(3) whether the local variables on the stack have large array variables, leading to stack overflow exceeding the default limit
(4) Whether
Chapter 3rd Resource ManagementResource ManagementThe so-called resource is that once it is used, it will have to be returned to the system. The most common resource used in C + + programs is dynamic memory allocation (which can lead to memory leaks
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.