The implementation of the string class in C ++ has not been completed yet.
Note the following:
(1) The value assignment operator returns a mystring & while the overloaded + operator returns a mystring. For the reason, see Objective C ++. When
In the design mode,Adapter ModeAdapter pattern is sometimes called a packaging style or packaging. Transfers the interface of a class to what the user expects. An adaptation means that a class cannot work together because the interface is
The execution of the derived class function consumes system resources and calls the parent class function when the function is executed.
MultithreadingProgramWhen a thread function needs to use the member variables and member functions of the class,
This problem has been around for more than a month ago, but it is still necessary for me to record it with a new linux user.
In the past 07 years, we also studied how to build an ROR server on Linux. But at that time, it was also necessary to have
First, reload:
Overload refers to the overload of functions, and there are reloads of member functions and general functions. There is no difference between the two, but it is only in different places.
Function overloading indicates that the
Object-oriented Thinking: encapsulation, inheritance, polymorphism.
1. Scope operator "::"Scope: the scope of a variable in a program.It can be divided into global scope, local scope, and statement scope.Scope priority: the smaller the range, the
When we mention a ^ B % C, we naturally think of the modulo repeating square hair. A solution can be obtained within the time complexity of log (n.
However, in some cases, it cannot be calculated as follows:
Case 1: C is very large (C> = 2 ^ 32),
Java calls local methods through JNI, while local methods are stored in the form of library files (on Windows platforms, DLL files and so files on UNIX machines ). By calling the internal method of the local library file, Java can achieve close
Looking at Objective C ++, the author has always stressed that Using STD: tr1: shared_ptr is much better than auto_ptr.
Shared_ptr uses reference counting. Multiple pointers can point to the same object. auto_ptr cannot. Only one pointer can be run
Global/static data zone: stores global variables and static variables declared by static variables.
Constant storage zone: stores constants, such as char * s = "ABCDE"; or const int I = 10; Code zone: skip this step. Place of code
STACK: temporary
This is a string class written at the beginning of C ++. Some details are worth pondering. I have never had time to rewrite it. I will change it later.
#ifndef _MYSTRING_H#define _MYSTRING_H#include#include#include#includenamespace mstr{class
Note: today, I don't know how to post code and image buttons on the csdn blog. I can't post it. I can only copy the code to explain the problem.
As for the singleton mode, it is one of the most basic modes in the design mode. To put it bluntly,
The rule mode is a commonly used design mode. It is mainly embodied in the fact that objects can have certain behaviors, but different implementation methods are used in different scenarios!
Similar situations are often encountered in software
Proxy mode, so what is proxy mode? We can understand it in this way. I am very busy and I am not busy with you. If you want to contact me, please contact my agent first, the agent will always knowWhat can the agent do and cannot do? That is, two
At the beginning, I always felt that the builder model was not very easy to understand. Maybe it was because I was stupid, so I had to think more about it.
I am not very familiar with the builder mode in the big talk design mode. I have read it many
# Pragma once # include # include # include using namespace STD; Class strcoding {public: strcoding (void );~ Strcoding (void); void utf_8togb2312 (string & pout, char * ptext, int Plen); // convert utf_8 to gb2312 void gb2312toutf_8 (string &
Code is elsewhere
The first function is successful. The second function runs and finds that it will kill the target program. Maybe the target program has a protection mechanism.
Supports Unicode encoding.
// Inject // function: injectdll //
I have been practicing for 2 months. in this article, I would like to remember the summer vacation I used for my internship. t_t)
Start:
Simply put, vector inherits _ vector_base, which can be implemented in two layers. In _ vector_base,
1. static variable
The type description of static variables is static. Static variables belong to static storage, but not necessarily static variables. For example, an external variable is a static storage method, but not necessarily a static
Singleton ModeIt is also called the single-piece mode and the list mode. The Singleton mode ensures that a class has only one instance and provides a global access point for it. This instance is shared by all program modules. Such functional
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