C/C++??????????????????
???????????? ???????[ 2014/8/22 10:46:37 ] ??????????????? C++ .NET
???????C/C++???????????
???????C/C++?????????????????????????????:
?????????/?????????
???????????????
???????????
???????
???????
?????????????????????????????????????????????????????????洢???У???C/C++?У?????????м??????????:???????????????????????????????????????????????????????в????????????????
????????
?????????/??????????д洢???????????????(????????????????????????)??
????????????????д洢?????е?????????
????????д洢????????????????????????????????????
?????????????????洢?????洢?????????????(new????malloc)??
??????????????????????????忴??:
#include
#include
int g_nGlobal = 100;
int main()
{
char *pLocalString1 = "LocalString1";
const char *pLocalString2 = "LocalString2";
static int nLocalStatic = 0;
int nLocal = 0;
const int nLocalConst = 100;
int *pIntNew = new int[5];
char *pMalloc = (char *)malloc(1);
printf("global variable: 0x%x/n"?? &g_nGlobal);
printf("static variable: 0x%x/n"?? &nLocalStatic);
printf("local printer1: 0x%x/n"?? pLocalString1);
printf("local const printer: 0x%x/n/n"?? pLocalString2);
printf("new: 0x%x/n"?? pIntNew);
printf("malloc: 0x%x/n/n"?? pMalloc);
printf("local printer(pIntNew): 0x%x/n"?? &pIntNew);
printf("local printer(pLocalString1): 0x%x/n"?? &pLocalString1);
printf("local printer(pLocalString2): 0x%x/n"?? &pLocalString2);
printf("local variable(nLocal): 0x%x/n"?? &nLocal);
printf("local printer(pMalloc): 0x%x/n"?? &pMalloc);
printf("local const(nLocalConst): 0x%x/n"?? &nLocalConst);
delete []pIntNew;
free(pMalloc);
return 0;
}
??????
???·???
??????????????????
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