This article is from the book C ++.
Before Yan
C ++ is one of the most popular and widely used programming languages in recent years. C ++ is developed on the basis of C language, and implements a transformation from process-oriented to
From "high quality c ++ programming 』Pointers and references are described in detail in terms of more than tive C ++. I will forward them to you.Clause 1: differences between pointers and referencesPointers and references look completely different
1. There are three types of transformation grammar,C-style Transformation: (T) expressionFunction Style Transformation: T (expression)There are no differences between the two ways, except for the position of parentheses, which can be referred to as "
The usage of the const keyword in C ++ is very flexible, and the use of const will greatly improve the robustness of the program. I will summarize the following information based on various aspects and hope to help my friends.
Const is a common type
Today, when writing code for a double-stranded table, I encountered the following confusion: When function parameters are passed, the form parameter is declared
1 strunct queue *&Q;Half a day
* & QSo I read a lot of information about pointers and
Use of C ++ proxy classes
The so-called proxy class is surrogate. Why should we use it? A simple example is as follows.
1 class Vehicle2 {3 public:4 vehicle (){}5 virtual string getname () = 0;6 }:78 class car: Public Vehicle9 {10 public:11 car (){
1. static keywordsTo have a deep understanding of the static keyword, you must first master the composition of the Standard C program.Standard C Programs are always composed of the following parts:1) body segment-The machine instruction part
1. Internal implementation of vector
For vector, any insert/delete operation will invalidate the iterator, so be careful
The internal implementation of vector is actually a continuous memory, which is different from the traditional array. It can be
Problem description
The procedure is as follows:
# Include # include using namespace std; class Base {public: virtual void fun () {cout fun ();} void fun3 (Base & B) {B. fun () ;}int main () {Derived d; fun1 (d); fun2 (& d); fun3 (d); system
This is a very good book. We recommend you read it. Of course, the book is not necessarily true. Readers need to think and understand it on their own.
This article records some of my views.
Clause 1: differentiate pointers and references.
Of
The best programming language section of the programmer interview guide, a programmer Interview GuideBest programming language in programmer Interview Guide
The essence is called to get its dregs. This article keeps in mind some key knowledge
----------------------------------------------
// OK
Int ivals (1024 );
Int ival (INT ());
// Each built-in data type supports a special constructor syntax to initialize the object to 0
Int ival = int ();
-----------------------------
Pointer and reference have two types under the Inheritance Mechanism:
Static type refers to the type when it is declared;
Dynamic types are determined by the objects they actually refer.
Clause 1: differentiate pointer and
Q: What is C style conversion? What are static_cast, dynamic_cast, and reinterpret_cast? What is the difference? Why?
A: The meaning of conversion is to change the expression of a variable by changing its type to another type. To convert a simple
Memory alignment
Constant folding
Stack Unwinding)
Template Specialization
Special Template
Template instantiation
Function object
One-definition rule (ODR)
Auto-Reference
Object slicing: When a derived class object is assigned to a base class
Preface
Shouji opened the last few chapters of "Zhuji", so this article is more about Chapter 13, 14, and 15. The main content of this article is "AVL Tree", that is, the balance tree, which is one level lower than the red/black tree. The mess is
Transferred from
Http://www.cnblogs.com/wangminbai/archive/2008/02/22/1077203.html
We all know that pointers can be used in C, but now VB (of course there are VBA) can also be used as pointers. This is an article I have read on the internet for your
Chapter 2: References
References are declared as scalar types (named variables starting with $), and reference is obtained using the \ operator.
Modifying the referenced variable is equivalent to modifying the reference pointing to the
Differences between the four cast operators of C ++Not my original ----------------------------------------------------------------------
Q: What is C style conversion? What are static_cast, dynamic_cast, and reinterpret_cast? What is the difference?
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.