C ++ProgramMemory pattern is usually divided into four areas:
Global data zone;
CodeArea;
Stack area;
Heap zone (free storage zone ).
Global variables, static data, and constants are stored in
Global data Zone, All class member
Initialization definition method:
String S1; // default constructor. S1 is an empty string.String S2 (S1); // S2 is initialized to S1String S3 ("mengxm"); // S3 is initialized to a string literal valueString S4 (n, 'M'); // S4 initializes n
Unique_ptr is a smart pointer to exclusive ownership. It provides a strict semantic ownership, including:
1. Have the object to which it points.
2. The copy structure cannot be performed, and the copy assignment operation cannot be performed.
[Original] C ++ 11 right value reference
[Original] C ++ 11 lambda expressions
[Original] C ++ 11 Auto & decltype
[Original] Perfect forwarding for C ++ 11
[Original] C ++ 11 syntax dessert 1
[Original] C ++ 11 syntax dessert 2
[Original] C ++
Week_ptr is a weak reference to an object and does not increase the reference count of the object. Week_ptr and shared_ptr can be converted to each other. shared_ptr can be directly assigned to week_ptr. week_ptr can call the lock function to obtain
CodeStyle Guide: http://code.google.com/p/google-styleguide/use this code to understand and compile new code
Open source projects released by Google
Http://code.google.com/intl/zh-CN/opensource/projects.html
Google's complete open-source
In C ++ 11, asynchronous task async and future can be used together to complete lightweight concurrent programming. Async is easy to use. You only need to input the function to be executed concurrently. Future is used as a placeholder to obtain the
A function is a set of function object packaging templates that implement a generic callback mechanism. A function is similar to a function pointer, and has the advantage that it allows users to have greater flexibility in the implementation of the
1. gcc support for the tr1 Database
You can go to the GCC support status for tr1 to view the latest status. Currently, GCC's support for the tr1 library is implemented in individual files and all files are stored in the tr1 subdirectory. For
The following key points are for all c ++ ProgramApplicable to all members. The reason why I say they are the most important is that ++ It cannot be found in the book or on the website. For example, the pointer to a Member is not to be mentioned in
First, let's vomit about the weather in Hangzhou. It's so hot! Although no sister has been dating me, it is also annoying to stay in the big nest!
Next to C # Basic Types Type and member Basics
In C #, multiple members can be defined within a
Adapter Mode
The adapter mode is a very understandable mode, which is also very common in life. What Plug 2 ports to 3 Ports, what USB to PS2, This is the adapter mode. To put it bluntly, if you have some interfaces that provide a lot of
1. Overload only functions of different return types cannot be overloaded.
2. The so-called private means that the member can only be accessed by the method of the class itself-even the object of this class cannot be accessed directly.
3. the
Clause 01: regard C ++ as a Language Federation: C, object-oriented C ++, template C ++, STL
Clause 02: replace const, Enum, and inline whenever possible # define:
1. For simple constants, it is best to replace it with a const object or enum #
1. The DLL interface must be declared in. Def; otherwise, VB cannot be called. According to the existing information ,. the def file is completed in the same way as extern "C". That is to say, if extern "C" is used in the header file defined by the
Recently I read "second edition of C language programming" and did the above exercises.
1. Write a program to print the histogram of the word length in the input.
First, if you do not enter a word, you need to enter a space, enter a word, enter a
Next, I wrote C language: calculate the number of input characters. This article describes how to calculate the frequency of each letter in the input.
It is also the second edition of C language programming:
2. Compile a program to calculate the
Today I wrote a program to help students process the data in a dat file. Using fopen and fscanf to read numbers in a file is always fruitless. Later I found the problem occurred on "wt +". Every time I open the mode, the original file will be
The erase function is prototype as follows:(1) string & erase (size_t pos = 0, size_t n = npos );(2) iterator erase (iterator position );(3) iterator erase (iterator first, iterator last );That is to say, there are three usage methods:(1) erase (pos,
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