A system environmentWin7 Flagship edition x86_64Two-Mount IDERadasm.v2.2.1.9.cao_congThree currently encountered in this version of the pit1 The IDE's cursor to Chinese compatibility is not very good, when the size of the editing area of the font,
Register: This keyword requests the compiler to make the variables available in the CPU internal registers as much as possible, rather than through memory addressing, to improve efficiency . note is as far as possible, not absolute . You think, a
#include setpresition (int n); Sets the output precision of the floating-point number to N."Goto Statement"Goto, also known as unconditional transfer statement, buys the courage to change the order in which statements are executed. The general
C language has a lot of keywords, there are register,static,const,extern,typedef, many people may only know its superficial meaning, the use of the understanding of which is not in place, I hope this article can help you:
1.register
001 Key Words
C language altogether 32 keywords 1. Declarations and definitions
Before you begin to recognize a keyword, you must understand what a statement is and what defines it:
Definition: (compiler) Creates an object,
1. Classes and objectsmember functions, member variables, the ability to abstract encapsulation.To find the area of the circle;#include using namespace Std;class circle{private: double m_r;//member variable public: void Setr (double R)//member
============set optional===========Set nu//Display line numberSet Rnu//Display relative line number cursor behavior 0 up and down rows increment relativenumberSet numberwidth//setting line number widthSet wrap//over window width wrapSet
Global variablesScope: Global scope (global variables can be used for all source files only if they are defined in one source file.) )Life cycle: Program run time is always presentReference method: The global variable to be referenced must be
1, can local variables and global variable duplicate?
A: Yes, the local will screen the overall situation. To use a global variable, you need to use the "::"
Local variables can have the same name as global variables, and when referenced within a
stm32f103 the function code in the UCOS-II code in the Os_cpu_pendsvhandler.
Ucos-ii is a non-stripped operating system, task switching occurs only in the following situations:
1> external interrupts cause changes that cause high priority tasks to
A thorough understanding of C VariablesVariables are the most basic and core concepts of C language. C variables are complex. Here we will make a summary and hope to help students who want to learn C.I. Recognition VariablesThe literal meaning of a
C/C ++ language learning-Memory Allocation Management and Language Learning
1The memory occupied by a C-compiled program is divided into the following parts:
1. stack: automatically allocated by the compiler when the program is running, storing the
C ++ (4): variables and variables
Local variable
Variables defined in a function are internal variables, which are valid only within the scope of the function. That is to say, they can only be used in this function, and cannot be used outside of
"Local Variables" (local variable)1, defined in a function, the scope is only within the scope of this function.2, defined in a compound statement, the scope is only in the compound statement."Global Variables" (Globals variable)#定义在函数之外, the scope
1 Auto2 extern3 Register4 static1 AutoAuto is used for software engineering specifications, so that the code is clear and understandable, if only for the program can run up, can not add.Automatic variable int num, equivalent to auto int
All variables in C + + can be defined when they are needed.Variables in the C language must be defined at the beginning of the scope.Register keyword requests the compiler to store local variables in registersCannot get the address of register
Most commonly used:X Delete the following character x delete the previous character Delete 3 characters is 3xDD: Delete one row D Delete to end of lineJ: Remove line breaks to make the next line come up. NJ: Connecting the following n rowsU: Undo
write in frontThis afternoon a colleague asked "register" what is the role of the keyword? Oh, you're talking about "register", it's a function of ... My head is suddenly broken, I rub, what do you mean, so familiar with the strange feeling. C
[SOURCE DOWNLOAD]Indispensable Windows Native (6)-C language: FunctionsWebabcdIntroducedEssential C language of Windows Native
Function
ExampleCFunction.h#ifndef _myhead_function_#define_myhead_function_#ifdef __cplusplusextern
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.