Structured programming advocates the analysis of requirements by function, the main principles from top to bottom, gradually refinement, modularity and so on.advocated by the function of the software system gradually subdivided, each function is
9.2.4 Static Duration, external linkage
) External Variables
External variables is defined outside, thus External to any function. It is also termed global variables, which could being accessed in any function that follow ' s the
A const is a read-only meaning that is used only in declarations; a const-decorated data type is a constant type, and the value of a variable or object of a constant type cannot be updated.The role of the const:(1) You can define const constants,
ConstConst-Modified things cannot be modified (from left-to-right-the clockwise spiral rule) pointer types can be understood in 3 situations depending on location:1. Constant pointerNSString * Const pt1;//constant pointer, pointing to a string//pt1
1: The wrong return code of the called function should be handled carefully and comprehensively.2: Clear function function, accurate (rather than approximate) realization function design.3: When writing reentrant functions, you should be aware of
Reprinted from http://www.cppblog.com/shifan3/archive/2007/01/05/17325.html
Some write C/C ++ (C ++ is assumed below)
Program Unresolved external link or duplicated external simbol error messages are lost (because such error messages cannot be
Static global variable: is the variable that can be used for methods in the current. M. Each time the call is invoked, the result of the last call is automatically used. Because only one memory address is allocated in the static allocation area, the
First, the outsetstepping into the embedded software industry is nearly 2 years, starting from the beginning of Mengmengdongdong Learning C language, since the undergraduate in this area to understand less, so learning more difficult, but there is a
Http://www.cppblog.com/shifan3/archive/2007/01/05/17325.html [yc] detailed link
LinkSome people write C/C ++ (C ++) programs, you are overwhelmed by the error message of unresolved external link or duplicated external simbol (because such an error
Refer to various documents on the Self-network:
A reentrant function is simply a function that can be interrupted. That is to say, it can be interrupted at any time during function execution and transferred to the OS for scheduling to execute
The following memory is reprinted:
Source Address: http://blog.csdn.net/yueyahe/archive/2006/05/15/729126.aspx
I. reentrant Functions1) What is reentrant?The reentrant function can be used concurrently by more than one task without worrying
C LanguageMemory is required to store data. The memory is mainly divided into two types: static storage area and dynamic storage area;
1.Static storage ZoneIt can be divided into read-only data, RW data, and uninitialized data (BSS ). They
1. Can a local variable be renamed with a global variable?
A: Yes. Global blocking will be performed in some cases. To use global variables, you must use "::"
A local variable can have the same name as a global variable. A local variable with the
Last night, the roommate sent a program, first paste the code:#include #define N 20Short buffera[n]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};Short bufferb[n]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};int DOTP (short a[n],short
From: http://www.cppblog.com/franksunny/archive/2007/08/03/29269.html
It is mainly used in multi-task environments. A reentrant function is simply a function that can be interrupted. That is to say, it can be interrupted at any time during function
1. c ++ variables have different scopes based on different lifecycles of the defined positions. The scopes can be divided into six types:
Global scope, local scope, statement scope, Class scope, namespace scope and file scope.
From the scope:
1>
The code word "C and data structure-Overview (1)" Yesterday was all text and confused. If there are too many words in a technical field, it is really uncomfortable. ImageCodePeople who like to know this kind of things directly read the code to read
I. Static variables static variables are roughly divided into three usage types
1. It is used in local variables to become static local variables. Static local variables have two usages: Memory Function and global survival.
2. It is used for
C ++ from scratch (11)
-- Knowledge about classes
Due to space limitations, this article is the next article in "C ++ from (11)", discussing polymorphism and other issues.
Virtual meanings
The middle part of this article has already introduced the
Possible iOS written exam questions (4)--c language may be encountered in the iOS written test face questions (4)--c languageC language, the basic foundation of development, iOS many advanced applications have to deal with C language, so, C language
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.