C # access private members of similar instances
Code
As we all know, a private member of a class can only be accessed within it!
But I don't know if you have noticed that, in fact, a class instance in C # can access the private members of another
When using the template, remember that typename and class are used as parameters. It's amazing to see it again.
Template parameters are not limited to types. You can use built-in types in the compiler.
The template tells the compiler that some
Finally, I read this book completely.
The content in the book involves a wide range of technical aspects and detailed knowledge points, so that many people think that this can only be used as a reference manual.
However, I finally gave it to me.
1 sizeof is not a function, but an operator.
2. When parsing, the compiler ignores the type name, And the const is near to the person Who modifies the person.
Const int * P; // P variable. The object pointed to by P cannot be changed.
Int
Each container type defines its own iterator type.
Take the vector container as an example: vector :: iterator ITER;
In addition, each container type also defines a const_iterator type, which can only be used to read elements in the container,
1. Concepts Scott Meyers gave an example in more effective C ++. Do you still remember this? When you are still at school, your parents want you not to watch TV, but to review your lessons, so you keep yourself in the room and make a look at your
The string type and many other library types define some ancillary types.With these types, the use of database types can be unrelated to machines.For example, string: size_type:String. Size () returns a value of the size_type type. The return value
I. Zero-length Array(For another article, refer to here)
In standard C or C ++, int array [0]; is invalid because it does not support arrays with a length of 0. However, some compilers (such as GCC) support an array with a length of 0.
In C, the
In some large projects, there may be dozens of basic classes, which are inevitably referenced by each other (not satisfying the inheritance relationship, but composite relationship ). That is, mutual declarations are required. Well, this will bring
Commonly Used in C # define, C ++, as mentioned above. Use const ..Or enumerate the enum method ..# The define command is also a macro definition Command ..1. Variable description:# Define PI 3.14159262. Macro embedding. One macro name can also
First, let's talk about the constructor. We all know that the constructor can call member variables, and the Child class in inheritance is to turn the members of the base class into their own members, that is to say, the subclass can call the
It is very efficient to operate strings in C, but it is also very troublesome.
1. char * strcpy (char * destination, const char * Source );
The most common function is not secure because destination has enough space and source and destination
A thin book is well-known.
I read this book with enthusiasm and expectation with so many comments and recommendations.
From the initial surprise, to the next great success, then the panic, and finally the decision to calm down and study c ++ well.
What is sfinae?
Substitution failure is not an error. A matching failure is not an error. It means that a function template matching rule is used to determine whether a property of the type exists, that is to say, sfinae can be used as an
Begin_message_map associates the message with the function pointer.
1. manually add a message response mechanism to the CPP file of the window class,
On_message (ID, Handler)Lresult handler (wparam, lparam); // Response Function
Dynamic_cast (expression)
Dynamic_cast operator should be the most special of the four, because it involves compiler attribute settings and object-oriented polymorphism andProgramThe running status is also related, so it cannot be completely
Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
Public
Class
Encryptdecrypt{
Public
Static
String
Encryptstring (
String
MES,
String
Key){
Byte
[]
1. What is the difference between thread and process ?. NET introduces the concept of application domain, so what is the difference between the three of them? Will application domain introduce some potential problems?
2. What are the differences
Document directory
1. Define a function Template
2. Use template Functions
3. Confirm the returned parameters.
4. Multiple Template Parameters
5. template function Overloading
6. Example of string Overloading
7. Always define the overload
Polymorphism is one of the basic features of object-oriented. Virtual functions are the method for implementing polymorphism. So how does virtual function realize polymorphism?
1. Memory Distribution of the base classPlease refer to the following
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