This series mainly records what the design pattern intends to be, what issues it wants to solve, and when it can be used; how it solves it, master its structure diagram, remember its key code; be able to think of at least two of its application
After the Declaration and operation of pointers in the previous article, this article describes several common and important pointer concepts.I. pointer constants and constant pointers
These two concepts also exist as follows. Like two connected
In php, count ($ arr) is used directly. It is very difficult for a function to determine the number of arrays in c. If php is written in C, you can see how to write the function... Oh, my God, the fact is much more complicated than I thought... 1.
Function: separate input characters from the keyboard with spaces. Press enter when q or Q is entered to indicate that the input is complete.
Release the main function first.
int main(){ MyNode *myNode = (MyNode *)malloc(sizeof(MyNode));
Next, let's take a look at the memory management of some syntaxes.(1) Assignment
Assign: direct value assignment, default
Retain: Reserved object
Copy: copy objectSample Code:@ Property (assign) Person * person;@ Synthesize
". The memory marked by LC0 is located in the static allocation Area of the application. This area is allocated after the program runs, that is, "hello, world" is arranged as a C-language String constant in the static allocation area.
Another very
Basic concepts:The Singleton design mode is one of the more common and widely used and simple design modes. Its design principle isAlways Returns an instance, that is, a class always has only one instanceBasic Steps for creating a singleton Design
Commands in Linux are divided into two types: Internal commands and external commands. Internal commands are implemented by Shell programs, such as cd and echo. Linux has a limited number of internal commands, and most of them are rarely used. Every
C language pre-compilation includes three types: 1. macro definition 2. file contains 3. Conditional compilation, which refers to compiling only when certain conditions are met. It has several forms:
(1) # ifdef identifier
// Program
# Else
//
1. the const modifier in const C language, which is less disgusting than C ++, is used to modify the const attribute of a variable. Variables modified by const in C language have read-only attributes and cannot be modified. Variable modified by
Zookeeper
C-compiled programs are not as strict as other advanced languages, leaving the programmer with "flexibility ", however, due to this flexibility, debugging of the program is inconvenient. Especially for beginners of C language, errors that
I have learned basic data types before. However, these basic urban data types are not objects. Therefore, messages cannot be sent to them.
And sometimes they need to be processed as objects. Instead, we need to put basic data types into the
The NSMutableString object inherits from the NSString object, that is, this method has all the methods of NSString and has its own unique methods.As follows:1: Insert a string // Insert the string NSMutableString * string19 = [[NSMutableString alloc]
Memory Management Mechanism in cocoa-reference count
Cocoa provides a mechanism to implement the above logical model, known as "reference count" or "Reserved count ". The value of the reference count indicates that several "persons" of the object
Basic concepts of proxy Design PatternsProxy refers to the response that an object provides the opportunity to change its behavior in another object.In short, the default basic idea of proxy design-two objects work together to solve the problem,
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.