Finally open a blog, after a busy exam week, forget the almostFeatures of Linux 1. Multi-User 2. Multi-tasking 3. Multi-platform 4. Good user interface 5. Powerful network function 6. Safe, stable and efficient 7. Good portability 8. Open and
In a software system, the "behavior requestor" and "The behavior realization person" usually present a kind of "tight coupling". However, in some cases, such as "record, Undo/Redo, transaction" and so on, this can not resist the change of tight
This blog I am going to write some of the algorithms I have seen, although I have seen very little, but I believe there will be more and more to facilitate the future of their own inspectionOkay, here we go.The most efficient algorithm for solving
#include #include #include using namespace std; const int MAXN = 1 m = m; n = 1; while (n 0; i) {a[i] = A[l (i)] + a[r (i)]; }} void reset (int i) {i + = n; while (i > 0) {--a[i]; I >>= 1;
A Union is a special class. A Union object can have more than one data member, but at any point, only one member can have a value. When you assign a value to a member of the Union object, everything else becomes undefined.The amount of storage
Compile-time polymorphism--function overloadingThe compiled intermediate code, such as GCC , produces an . o file. At this time is not assembly language) function name changes, look at the following two examples. void Cc_show (const char*str), _Z7CC_
Write a log class using c++11The main practice of thread mutex usageThe code is as follows:#include "stdafx.h" #include "Logger.h" #include #include logger::logger (const string & filepath): Filepath_ (filepath) {}logger::~logger () {Thread_.join ()
The enum keyword is used to create an enumeration type
Enum is an alias of the Enum Abstruct class
Enum declaration position: in class or inside class but not within method (Enum declaration within method, compiler will error)
Enumerations
Construction and destruction of objects:Global objects All global objects in a C + + program are placed in the program's data segment. If you explicitly assign it a value, this object will be the initial value. Otherwise, object is configured to
Unique and Unique_copy belong to the STL template of C + +, header file is algorithmfunction:Removes duplicate adjacent repeating elements, that is, if the two elements are the same but are not adjacent, it will not be removedUnique will repeat the
3.1 Why generics are required
Avoid casting, make code easier to read and write, and reduce the chance of bugs.
Improved performance
Since the compile time to do more checks, run-time check can do a lot less.
JIT
Since Visual Studio cannot directly set the path of obj, we can only modify the project file directly.First open the project file, in and Under Add, .... \obj\ andfalseIf you remove the 2nd option and delete the obj directory in the directory
Type conversions
Any type can be converted to its base class type, complete with implicit conversion;
When any type is converted to its derived type, the conversion must be displayed. such as: (type name) object name;
The
NameValueCollection class is in System.Collection.Specialized assembly.Unlike with HashTable, NameValueCollection can has more than one of the values for one key.So there are no error for code below:NameValueCollection MyCol = new
Slowly found that the C language Foundation is so weak, by these characters input function confused and ~ ~Come and grieve once more.So, let's start with scanf:Say you want to enter a string of characters into a character array, such as the
Enter a directory file name from the keyboard;Print A. c file to determine whether the curly braces appear in pairs;#include int main () {file *rfile = null;char*pput=null;char name[100] = "0"; int count=5;char ch= ' 0 '; flag:printf ("Please
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