1. essentital C ++ --- the father of Lippman --- C ++, with the focus on the core, light and short, for beginners
2. The C ++ programming language ---- father of C ++, technical authority, deep words, profound thoughts, C ++ encyclopedia, and the
In the middle of a period of time, to prepare for the next project, I temporarily put down the learning of drawing tools and encapsulated a TCP class. Recently, I finally finished some of my chores and continued to study the knowledge of GDI.
There is a function in "stdlib. H": ITOA; its function is to convert the specified integer to any hexadecimal value (in the hexadecimal value range of 2 ~ 36). The prototype of this function is as follows:Char * ITOA (INT num, char * STR, int
The copy constructor and the copy assignment operator are called copying functions. These "compiler generation version" behaviors: All member variables of objects to be baked
Make a copy.
Declare your own copying function,
Void logcall (const
Const modifier pointer: If the keyword const appears on the left side of asterisk *, it indicates that the indicated object is a constant. If const appears on the right side of *, it indicates that the pointer itself is a constant, if it appears on
What is an interface? An interface is a mechanism that defines the methods to be implemented by the class and the feature labels of these methods. If ianimal is an interface, while cdog is a class with an interface ianimal in advance, the cdog must
From: http://blog.csdn.net/erazy0/article/details/5463837
To illustrate how to use this technique, let's give a simple example. For example, to develop a network program, you need to count the number of packets of various network protocols.
★Version
We often encounter all types of controls and perform some operations. There are generally the following types:
1. Check whether the input control is empty?
2. Clear all input controls.
3. Set certain properties of all controls, such as color and
References are a concept in C ++. Beginners can easily confuse references with pointers. In the following program, n is a reference of M, and M is a referent ).
Int m;
Int & n = m;
N is equivalent to M alias (nickname). Any operation on N is an
Data Structures in C
Machinery Industry Press
Ellis horrowitz, Sartaj Sahni, by Susan Anderson-freed
Translated by Li Jianzhong, Zhang Yan, and Li Zhijun
1.2.2 Calculation of polynomials Based on the Horna rule
1.2.10 Recursive Implementation of
Bitwise OPERATOR:
The integer operand is considered as a set of binary BITs, which provides the test and setting functions for each bit.
~ : Reverse by bit
: The right operand identifies the number of digits to move left to generate a new value,
// Observer. cpp: defines the entry point of the console application.//
# Include "stdafx. H"# Include # Include # Include
Using namespace STD;
Typedef int state;
Class observer;
Class subject{Public:Subject (): m_nsubjectstate (-1 ){}Virtual
// Flyweight. cpp: defines the entry point of the console application.//
# Include "stdafx. H"# Include # Include # Include
Using namespace STD;
Typedef string state;
Class flyweight{Public:State getintrinsicstate (){Return m_state;}
Virtual void
// Strategy. cpp: defines the entry point of the console application.//
# Include "stdafx. H"# Include
Using namespace STD;
Class strategy;
Class Context{Public:Context (Strategy * pstrategy = NULL): m_pstrategy (pstrategy){}~ Context (){}
Void
// Template method. cpp: defines the entry point of the console application.//
# Include "stdafx. H"# Include
Using namespace STD;
Class abstractclass{Public:Abstractclass (){}Virtual ~ Abstractclass (){}
// This function defines the algorithm
Sequence: a major objective of C ++ is to promote code reuse, including public inheritance, inclusion, use of private or protection of inheritance.
1. Class containing object members
1) Introduction to the valarray class # include
Function: process
1. char * const P;
Char const * P
Const char * P
What are the differences between the three above?
Char * const P; // constant pointer. The value of P cannot be modified.Char const * P; // pointer to a constant. The constant value cannot be changed.
// -- Base class
Function _ system ()
{
}
// Three data stream types contained in the base class
_ System.int = 0;
_ System. bool = false;
_ System. String = "";
_ System. Char = '';
// Encapsulate the Time Function
_ System. Prototype. datetime =
1. C-language string
In the C language, processing a string is a pain point, because the most difficult type-pointer is usually used to implement string operations.
For example:
// Example 1:
Char STR [12] = "hello ";
Char * P = STR;
* P = ''h''; //
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