???C/C++?????????????????????
???????????? ???????[ 2015/4/7 11:14:42 ] ????????C++ ????? ????
????1?????岻??C/C++???????????????????“??”??????????????????????????
????2??????????ú????????б?????????????????????????????±???????????????磺
????#define SQUARE(x) ((x) * (x))
????int n1 = 5;
????int m1 = SQUARE(n1++); //m1 = 25??n1 = 7
????int n2 = 5;
????int m2 = SQUARE(++n2); //m2 = 49??n2 = 7
????3??????????????????????????????????????????????????????????磺
????#define SQUARE(x) x * x
????int m = SQUARE(3 + 5); //????????m = 3 + 5 * 3 + 5
????4??????????????????????????#undef????????壬???????????????????????????
????5??????α???#error????????????????????й??????????磺
????#if !defined(WIN32)
????#error ERROR: Only Win32 Platform supported!
????#endif
????#ifndef _cplusplus
????#error ERROR: MFC requires C++ compilation!
????#endif
???????????????????ó?????δ?????WIN32????cplusplus?????#error????????????????????????????????????????Ρ?
????6????????????????????????????????δ???????п??????????????????????????鷳??????????????????α???#if????????δ??????磺
????#if 0
????…//??????ε????
????#endif
?????????????????????????????????????????????α???????????б???????е??????sizeof?????????????ó?????????
????7??????α???#pragma??????????????????????????????磺
????#pragma pack(push?? 8) /*???????????????*/
????#pragma pack(pop)
????#pragma warning(disable:4069) /*?????????C4096???????*/
????8????????????#?????????δ???????????????????????????У????????????????????????????????????磺
????#define STRING(s) #s #s #s
????#define TEXT(s) "class" #s "Infor"
????int abc = 100;
????STRING(abc) //????abcabcabc
????TEXT(abc) //????classabcInfor
???????????#s????ж???????????????????
????9???????????##????????????????????к????????μ??????????????????????????磺
????#include <stdio.h>
????#define paster( n ) printf( "token"#n" = %d
"?? token##n )
????int main(void)
????{
????int token9 = 100;
????paster(9); //???token9 = 100
????return 0;
????}
?????????1??C??????????е???????????????????????????????2????ú?????????????????????????????ж??壬???????????“???????ж???”????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11