The use of this function is relatively simple, but often forget, so write it down.
1. Required header File
2. Function prototype
void * memcpy (void * destination, const void * source, size_t num);
(1) Copy the value of num bytes pointing to the
Run-time type recognition is implemented by two operators:
typeID operator, used to return the type of an expression
dynamic_cast operator, used to convert a pointer or reference of a base class safely to a pointer or reference to a derived
Note : The use of regular expressions for logon verification or input information validation, very convenient.
namespaces: System.Text.RegularExpressions
Case:
The regular expression contains the number 0-9 uppercase and lowercase letters, 8
0x00 process
We can see that first is the pressure parameter, then press the return address, then press EBP, then stack up, generate buffer, then press Register to protect the scene.Then loop through CC. Then the local variables are allocated in
The latest content has been posted in my GitHub Pages, csdn content is temporarily not updated (scheduled to be updated in the future), please go to the link to see the latest content. Welcome to star my repoTopic
The famous fast sorting algorithm
Static_assert:
This macro is used to detect and diagnose compile-time errors. Compile-time, which is a macro that is the opposite of Crt-assert (run-time macro). This good thing is used to detect the invariants of a compile-time program.
This
return value decltype (expression)
[The type of the return value is the type of the expression parameter]
This can also be used to determine the type of expression, as Bjarne implies, if we need to initialize some type of variable, auto is the
. NET does not encapsulate methods for obtaining timestamps (unixtime, relative to the number of milliseconds in the early hours of January 1, 1970). So I wrote the following methods to achieve.
Remind the friends in the groping, note the rounding
1. Follow the C style
Double a=1.1;
int b= (int) A;
2.double a=1.1;
int B=int (a);
3.static_cast (expression)//For general form type conversions
Double a=1.1;
int B=static_cast (a);
4.reinterpret_cast (expression)
For nonstandard pointer data
When a derived class is publicly inherited from a base class, the member functions of the derived class can directly access the public members of the base class, but they cannot access the private members of the base class.
Therefore, in order to
Definition of access rights protected:
Can be
1. Functions in the class;
2. Functions of subclasses,
3. Its friend function access. but cannot be accessed by objects of this class. the feeling is also sharp, in the actual application
1. Pointers and references
The reference must be assigned an initial value, no empty, and the pointer can be emptyPointers can be assigned again, but references always point to the original objectUse a reference when you know you need to point to
C + +:: STL:: Algorithm
1.sort (Complexity O (N*log (n)))
The ranking algorithm is undoubtedly one of the most used algorithms, the following describes the use of the STL in the sort: 1.1 normal array sorting, from small to large
Such as:
sort
(
#include using namespace std;
Don't ask me why I want to write the bubble sort of the list.
struct Node {int data;
Node *next;
Node (int d = int ()):d ATA (d), next (NULL) {}};
Class List {public:list (int a[], int n) {i = NULL; for
C + + initialization list
definition
think of the cause of this
the joy of the accident
definition
Unlike other functions, constructors can have initialization lists, in addition to names, argument lists, and function bodies, which begin with a
C + + Although the content is more, but subdivided down, can have several major parts, each part of the focus is different, I learn in the process according to these chunks to understand, found very efficient, so summarized as follows.
first, the
Recently in reading C + + primer, recorded reading notes. Const keyword
When we want to use a variable and don't want to be changed, we can use const to define a variable. This variable becomes an immutable variable, approximately equal to a
Problem: Two strings that are known to be stored separately with two single linked lists are sorted in ascending order. The programming implementation merges these two single linked lists into a single linked list in descending order of data field
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