Today see Caffe source of time to see a lot of macro definition of content, suffering from weak code base, unable to understand all, so in the Internet search this good article, reproduced aAttached original address:
As mentioned earlier, the subscript operator [] must be overloaded in the form of a member function of the class. The declaration format in the class is as follows:operator [] (parameter)OrConst operator [] (parameter)Using the first method of
01: Prevent a header file from being repeatedly included#ifndef Comdef_h#define Comdef_hHeader file Contents#endif02: Redefine Some typesPrevents different types of bytes generated due to various platforms and compilers, which facilitates
Defined:int New int [// array of ten uninitialized intsThis new expression assigns an array containing 10 elements of type int and returns a pointer to the first element of the array, which initializes the pointer Pia.An array object created in a
The random number of a machine is generated by a pseudo-random number, which is a sequence of small m-polynomial, in which each small sequence has an initial value, that is, a random seed. (Note: The period of the small m polynomial sequence is 65535
Escape character
Significance
ASCII code value (decimal)
\a
Bell (BEL)
007
\b
BACKSPACE (BS) to move the current position to the previous column
008
\f
Page Break (FF),
The relationship between C + + constructors, destructors, and virtual functions1. If we define a constructor, the compiler will no longer generate a default constructor for us.2. Compiler-generated destructors are non-virtual, except for a subclass
Pointers and references are common in C + +, but for the difference between them many beginners are not too familiar with the differences and usages of their 2.1. The definition and nature of pointers and references differ:(1) Pointer: The pointer
1.const Basic Knowledge(1) Defining constants with constconst int a = 5; Defines an int type constant A with a value of 5(Note: It is stored in the symbol table (Key,value) in C + + and does not allocate memory space, only allocates memory when the
IEEE754 Standard, floating-point memory layoutThe following is only described by float (4 bytes in memory, 32bits), double (8 bytes, 64bits) in the same vein, only slightly different.The memory distribution of floatIEEE754 Specifies that 32bit float
standard C-language preprocessing requires defining some object macros, with the name of each of the predefined macros beginning and ending with one or two underscore characters that cannot be undefined (#undef) or redefined by programmers. The
C Language 32 KeywordsFirst Category: Data type keywordsA basic data type (5) void declares that the function has no return value or no parameter, declares an untyped pointer, and explicitly discards the result of the operation. char type data,
To say that this function is also because of job needs, the day of work to write a Web page needs Ajax request backstage and data in JSON format to the front-end, due to the company's particularity, can not be connected to the network (very bitter
In this lesson we will learn the parameter passing in the method, in object-oriented two, I have said that parameters are also one of the variables, in C language learning, the students have learned the concept of parameters and usage, the method
How to use Server.MapPathUsage:1.server.mappath ("/") where the application root is located, such as C:\Inetpub\wwwroot\2.server.mappath ("./") indicates the current directory of the page on which it is locatedNote: equivalent to Server.MapPath ("")
As we have always known, the Server.MapPath () property can get the root directory of the applicationHow to use Server.MapPathUsage:1.server.mappath ("/") where the application root is located, such as C:\Inetpub\wwwroot\2.server.mappath ("./")
Class inheritance and interface inheritanceA class inherits a type derived from a base class row that owns all member fields and functions of that base type.The interface inherits the signature of a type-inherited function and does not require
Two-point search also called binary search, its strength is to find fast, the flaw is the request to find the data must be ordered SEQUENCE. The fundamental idea of the algorithm is to look for the sequence of the two positions of the data and the
Deduction of the type of Item 2 auto in objective Modern C ++, objective tivemodernc
Note:
You also need to learn
↑Fragments in such a boxNot from the original bookBut my own understanding.
Item 2 Understand
AutoType deduction-
AutoType
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