The difference between #define, const, typedef#define is not defining variables, it's just for text substitution.For example:#define PI 3.1415926float Angel;angel=30*pi/180;Then, when the program is compiled, the compiler will first "#define PI 3.141
About define (' Discuz_root ', substr (DirName (__file__), 0,-7)); Understanding define (' Discuz_root ', substr (DirName (__file__), 0,-7)) ;Get site root directoryFor the above statement has not understood what is meant to check the relevant
Why define the ul {margin: 0; padding: 0;} selector in the css file?
Why define the ul {margin: 0; padding: 0;} selector in the css file?
Ul labels have padding values by default in FF, while only margin has default values in IE. What are the
#define是C语言中提供的宏定义命令, the main purpose is to provide programmers with certain convenience in programming, and to a certain extent, improve the efficiency of the program, but students often do not understand the nature of the command in learning,
Value of Do{}while (0) When macro definition (#define) in C languageRecently found in the code of the new company everywhere used do{...} while (0), Google a bit, found that stack overflow early on a lot of discussion, summed up the discussion,
Macro definition in many languages can see its shadow, C #, C++,c, and so on, especially the system API inside a lot of macro definition, looking very bluffing people. Reasonable use of macro definition, you can make your code look more standardized,
define CONTAINER_OF (PTR, type, member) ({\
Const typeof ((type *) 0)->member) *__mptr = (PTR); \
(Type *) ((char *) __mptr-offsetof (Type,member));}
The effect is this: if you get a pointer to a member of a large structure, you can get a
Definition:
The # define Directive
You can use the # define directive to give a meaningful name to a constant in your program. The two forms of the syntax are:
Syntax
# Define identifier token-stringopt
# Define identifier [(identifieropt,...,
See http://community.csdn.net/Expert/topic/3662/3662366.xml? Temp =. 1618006 there is a post about the excitement.The specific question is what is the macro function, # define macro1 (T, m) (INT) (void *) & (T *) 0-> m ). Is to get the offset of T
recently in reading the JavaScript Advanced Program design, is a bit forgotten to read the content, it is intended to do some reading in the form of blog notes. Today is about Four ways to define objects in JavaScript, in addition to these
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.