1 Preface
In the practical application, for some large-scale application system, the application business logic is quite complex, if the application system adopts the traditional client/server architecture, the business logic is too centralized and
"Implementation of named pipe Communication in C + + programs"
Recent learning C + +, Taker process to choose to implement a program with the injected Program interoperability tool, feel if the computer local communication using the socket seems to
Special operators for 5.4 Turbo C
One, "?" Operator
"?" The operator is a three-mesh operator, and the general form is:
?:;
"?" The meaning of an operator is to first evaluate the value of expression 1 and, if true, the value of expression 2 and use
1 reinterpret_cast (conversion is implemented during compilation)
The Reinterpret_cast type conversion function converts a pointer of one type into a pointer to another type. This conversion is not used to modify the format in which the value data
Second, increment operation
There are two very useful operators in turbo C that are not normally available in other advanced languages. These two operators are the 1 and minus 1 operators "+ +" and "--", the operator "+ +" is the operand plus 1, and
1,malloc and free are standard library functions for c++/c languages, and new/delete are the operators of C + +. Both can be used to request dynamic memory and free memory.
2, for objects that are not internal data types, Maloc/free cannot meet the
C + + provides four new type conversion operators:
Const_cast
dynamic_cast
Reinterpret_cast
Static_cast
How to use: Cast_operator (object)
Type conversion operator the object to convert for the type to be converted
①dynamic_cast converts a
1. Data type
In the Turbo C language, each variable must have its data type defined before it is used. Turbo C has the following types: integral (int), floating-point (float), character (char), pointer (*), Value-free (void), and struct (struct)
1. Constant pointer
Definition and use of pointer variables that point to constants
such as: const int *p;
2. Pointer constants
such as: char* const p = "ABCDE";
You can understand this:
The type char* of the const p, so p can not be modified.
* There are several other iterators for the container:
+ iterator: Normal iterator (commonly used)
+ reverse_iterator: Reverse iterators (sometimes used)
-Rbegin (), rend ()/return reverse iterator
+ Const_iterator: Constant iterator
+
Today, when I write the program, I use this idiom again, so I put it on the way. This idiom is quite simple, it is estimated that many people have used it. Today is mainly posted to the novice reference (veteran will not be time-consuming to see
file contains
File inclusion is another important feature of the C preprocessor. The general form of the file containing the command line is: #include "filename" in the previous we have used this command several times to include the header file of
Friends familiar with template programming may have heard this technique or pattern: Barton-nackmann techniques or singular cyclic template patterns (curiously recurring Template prattern).
In fact, in the C + + programming language, this Bible
Learn C + + Comrades do not know whether and I have encountered such a puzzle: C + + virtual function in the end how to achieve? What exactly is the structure of a virtual function table in a variety of inheritance relationships? Once I was thinking
4. Function parameter transfer
In the C + + language, the parameters and return values of functions are passed in three different ways: value passing, pointer passing, and reference passing.
The sample program for value delivery. Because x in the
C + + 's principles for definition and declaration are defined once and repeatedly declared. Defines the memory for which variables and functions are assigned, and the declaration specifies a reference label for these variables and functions that is
Will not knock, is I read someone else's knot report after knocking, study under
#include #include using namespace Std;typedef struct NODE{int label;int cnt;int leaf[200];};Node tree[200];int solve (int i){int stone[200],result,temp;if (tree[i].cnt=
Nested calls to functions
Nested function definitions are not allowed in the C language. Therefore, the functions are parallel, and there is no problem of the upper and the lower level functions. But the C language allows a call to another function
1.3.4break, continue and GOTO statements
1.3.4.1break statement
Break statements are usually used in circular statements and in switch statements. When the break is used in switch statement switches, the program can jump out of switch and execute a
The recent sudden interest in boost, but the boost installation is very troublesome, the online introduction of the method is mostly not comprehensive, found an article on the other compiler to install Boost method, try to change to c++builder2007
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