9.2 ¹²ÓÃÌå
CÓïÑÔ³ýÁËÌṩ½á¹¹ÌåÕâÖÖ¿É°üº¬¶àÖÖÀàÐÍÊý¾ÝµÄ¹¹ÔìÀàÐÍÍ⣬»¹ÌṩÁËÒ»ÖÖ´ÓÐÎʽÉÏ¿´ºÍ½á¹¹Ìå¿°³Æ“ÂÏÉúÐֵܔµÄ¹¹ÔìÀàÐÍ——¹²ÓÃÌ壨union£©¡£
±¾½Ú´Ó¹²ÓÃÌåµÄ¸ÅÄîÈëÊÖ£¬´Ó¹²ÓÃÌåµÄ¸ÅÄî¡¢Óë½á¹¹ÌåµÄÒìͬ¡¢Ê¹Óõȷ½Ãæ½øÐÐÏêϸµÄ½éÉÜ¡£
9.2.1 ʲôÊǹ²ÓÃÌå
ÏÖʵÉú»îÖУ¬Ä³Ð©ÊÂÎïÍùÍù¿ÉÒÔÓöàÖÖ·½Ê½È¥±íÊö£¬¸÷ÖÖ·½Ê½µÄµØλÊÇƽµÈµÄ£¬¶¼ÊÇ´Ó²»Í¬µÄ²àÃæÈ¥·´Ó¦Õâ¸öÊÂÎï¡£ÀýÈ磬¹ÅÈËÓõÄ×Ö¡¢Ãû¡¢ºÅ£¬¶¼ÊǶÔÒ»¸öÈ˵ijÆν£¬µ«ÊÇ»á¸ù¾Ý²»Í¬µÄ³¡ºÏºÍÇé¿öʹÓÃÆäÖеÄÒ»ÖÖ¡£ÓÖÀýÈ磬ÓÃÊý×ÖºÍÓÃÓÅ¡¢Á¼¡¢ÖС¢²î¶¼¿ÉÒÔ±íʾ³É¼¨£¬¾ßÌåʹÓÃÉÏ¿ÉÄܸù¾Ý³É¼¨µÄÖÖÀ಻ͬ¶øÑ¡ÓÃÆäÖеÄÒ»ÖÖ·½Ê½¡£
Èç¹ûÕâЩ·½Ê½¿ÉÒÔÓÃͬһÖÖÀàÐÍÀ´±íʾ£¬ÄÇôÊý×é“ÃãÇ¿”Äܹ»ÓÃÀ´¶ÔÆä½øÐд洢£¬µ«ÀË·Ñ´æ´¢¿Õ¼ä¡£¶øÈç¹ûÆäÊý¾ÝÀàÐͲ»Í¬£¬Êý×é¾Í“ÎÞÄÜΪÁ¦”ÁË¡£½á¹¹ÌåËƺõÒ²ÄܶÔÆä½øÐбíÊö£¬µ«²¢²»ÊÇ×î¼ÑµÄ·½Ê½¡£Õë¶ÔÕâÖÖÇé¿öÏ£¬CÓïÑÔÌṩµÄ¹²ÓÃÌåÊý¾ÝÀàÐÍ¡£
¹²ÓÃÌ壬Òà³ÆÁªºÏ£¬ÊÇÓбðÓÚÇ°ÊöÈκÎÒ»ÖÖÊý¾ÝÀàÐ͵ÄÌØÊâÊý¾ÝÀàÐÍ£¬ÆäÓÃÀ´ÃèÊöÀàÐͲ»ÏàͬµÄÊý¾Ý¡£Óë½á¹¹Ì岻ͬµÄÊÇ£º¹²ÓÃÌå¶Ô³ÉÔ±´æ´¢Ê±²ÉÓø²¸Ç¼¼Êõ£¬¹²Ïí(²¿·Ö)´æ´¢¿Õ¼ä£¬³ÉÔ±±»·ÖÅäÔÚͬһ¶ ......
9.2 ¹²ÓÃÌå
CÓïÑÔ³ýÁËÌṩ½á¹¹ÌåÕâÖÖ¿É°üº¬¶àÖÖÀàÐÍÊý¾ÝµÄ¹¹ÔìÀàÐÍÍ⣬»¹ÌṩÁËÒ»ÖÖ´ÓÐÎʽÉÏ¿´ºÍ½á¹¹Ìå¿°³Æ“ÂÏÉúÐֵܔµÄ¹¹ÔìÀàÐÍ——¹²ÓÃÌ壨union£©¡£
±¾½Ú´Ó¹²ÓÃÌåµÄ¸ÅÄîÈëÊÖ£¬´Ó¹²ÓÃÌåµÄ¸ÅÄî¡¢Óë½á¹¹ÌåµÄÒìͬ¡¢Ê¹Óõȷ½Ãæ½øÐÐÏêϸµÄ½éÉÜ¡£
9.2.1 ʲôÊǹ²ÓÃÌå
ÏÖʵÉú»îÖУ¬Ä³Ð©ÊÂÎïÍùÍù¿ÉÒÔÓöàÖÖ·½Ê½È¥±íÊö£¬¸÷ÖÖ·½Ê½µÄµØλÊÇƽµÈµÄ£¬¶¼ÊÇ´Ó²»Í¬µÄ²àÃæÈ¥·´Ó¦Õâ¸öÊÂÎï¡£ÀýÈ磬¹ÅÈËÓõÄ×Ö¡¢Ãû¡¢ºÅ£¬¶¼ÊǶÔÒ»¸öÈ˵ijÆν£¬µ«ÊÇ»á¸ù¾Ý²»Í¬µÄ³¡ºÏºÍÇé¿öʹÓÃÆäÖеÄÒ»ÖÖ¡£ÓÖÀýÈ磬ÓÃÊý×ÖºÍÓÃÓÅ¡¢Á¼¡¢ÖС¢²î¶¼¿ÉÒÔ±íʾ³É¼¨£¬¾ßÌåʹÓÃÉÏ¿ÉÄܸù¾Ý³É¼¨µÄÖÖÀ಻ͬ¶øÑ¡ÓÃÆäÖеÄÒ»ÖÖ·½Ê½¡£
Èç¹ûÕâЩ·½Ê½¿ÉÒÔÓÃͬһÖÖÀàÐÍÀ´±íʾ£¬ÄÇôÊý×é“ÃãÇ¿”Äܹ»ÓÃÀ´¶ÔÆä½øÐд洢£¬µ«ÀË·Ñ´æ´¢¿Õ¼ä¡£¶øÈç¹ûÆäÊý¾ÝÀàÐͲ»Í¬£¬Êý×é¾Í“ÎÞÄÜΪÁ¦”ÁË¡£½á¹¹ÌåËƺõÒ²ÄܶÔÆä½øÐбíÊö£¬µ«²¢²»ÊÇ×î¼ÑµÄ·½Ê½¡£Õë¶ÔÕâÖÖÇé¿öÏ£¬CÓïÑÔÌṩµÄ¹²ÓÃÌåÊý¾ÝÀàÐÍ¡£
¹²ÓÃÌ壬Òà³ÆÁªºÏ£¬ÊÇÓбðÓÚÇ°ÊöÈκÎÒ»ÖÖÊý¾ÝÀàÐ͵ÄÌØÊâÊý¾ÝÀàÐÍ£¬ÆäÓÃÀ´ÃèÊöÀàÐͲ»ÏàͬµÄÊý¾Ý¡£Óë½á¹¹Ì岻ͬµÄÊÇ£º¹²ÓÃÌå¶Ô³ÉÔ±´æ´¢Ê±²ÉÓø²¸Ç¼¼Êõ£¬¹²Ïí(²¿·Ö)´æ´¢¿Õ¼ä£¬³ÉÔ±±»·ÖÅäÔÚͬһ¶ ......
#include <stdio.h>
#include <string.h>
#include <math.h>
#define BASE 10
int intlen(long n);
int main()
{
int i, j, num, sz;
i = j = num = sz = 0;
if (!scanf("%d", &num) || num <= 0) {
printf("invalid input\n");
return 1;
}
sz = intlen(num);
for (i = sz; i > 0; i--) {
for (j = 1; j <= num; j++) {
printf("%d",(j % (int) (pow(BASE,i))) / (int) (pow(BASE,i - 1)));
}
printf("\n");
}
return 0;
}
int intlen(long n)
{
return log10(fabs(n)) + 1;
}
/* vim: set ts=4 sw=4: */
´Ó±ê×¼ÊäÈë½ÓÊÕÒ»¸ö´óÓÚ0µÄÕûÊý,ÊúÏò´òÓ¡1-Õâ¸öÊýÖ®¼äµÄÊý
Óõ½Á˶ÔÊýº¯ÊýÈ¡ÕûÊýµÄλÊý,È¡Ä£ÔËËã,Õû³ýÔËËã,Ö¸ÊýÔËËã ......
#include <stdio.h>
#include <string.h>
#include <math.h>
#define BASE 10
int intlen(long n);
int main()
{
int i, j, num, sz;
i = j = num = sz = 0;
if (!scanf("%d", &num) || num <= 0) {
printf("invalid input\n");
return 1;
}
sz = intlen(num);
for (i = sz; i > 0; i--) {
for (j = 1; j <= num; j++) {
printf("%d",(j % (int) (pow(BASE,i))) / (int) (pow(BASE,i - 1)));
}
printf("\n");
}
return 0;
}
int intlen(long n)
{
return log10(fabs(n)) + 1;
}
/* vim: set ts=4 sw=4: */
´Ó±ê×¼ÊäÈë½ÓÊÕÒ»¸ö´óÓÚ0µÄÕûÊý,ÊúÏò´òÓ¡1-Õâ¸öÊýÖ®¼äµÄÊý
Óõ½Á˶ÔÊýº¯ÊýÈ¡ÕûÊýµÄλÊý,È¡Ä£ÔËËã,Õû³ýÔËËã,Ö¸ÊýÔËËã ......
±¾ÈËÔÚ×ö±ÏÉèµÄʱºòÓöµ½µÄһЩÎÊÌ⣬ÔÚÕâÀï×ܽáһϣ¬Ï£Íû»á¶Ô´ó¼ÒÓÐЩ°ïÖú~Óв»×ãÖ®´¦»¹ÍûÖ¸³ö£¬´ó¼Ò¹²Í¬½ø²½^_^
Ò»¡¢»ù±¾½éÉÜ£º
1.ÔËÐл·¾³VC6.0£¨Microsoft Visual C++ 6.0£©£¨http://40.duote.org/microsoft_visualc6.zip£©
2.¿ÎÌâÏà¹ØÄÚÈÝ£ºAVSÊÓƵ±àÂë
¶þ¡¢³öÏÖµÄÎÊÌâ¼°½â¾ö·½·¨£º
1.ÎÊÌ⣺
fatal error C1083:"Cannot open include file: 'Dshow.h': No such file or directoryÖ´ÐÐ cl.exe ʱ³ö´í"
½â¾ö£º
°²×°DirectX SDK(Nov_08°æ)£¨ http://download.microsoft.com/download/5/8/2/58223f79-689d-47ae-bdd0-056116ee8d16/DXSDK_Nov08.exe£©
Platform SDK(PSDK-x86)£¨http://download.microsoft.com/download/a/5/f/a5f0d781-e201-4ab6-8c6a-9bb4efed1e1a/PSDK-x86.exe£©
ÔÚTools£>OptionµÄÑ¡ÏdirectoriesÖÐÔö¼ÓÏàÓ¦ÏîÄ¿¡£
ÔÚInclude filesÔö¼ÓDirectX£¬DirectShowµÄInclude·¾¶£¬ÔÚLibrary filesÖÐÔö¼ÓDirectX£¬DirectShowµÄLib·¾¶¡£
------------------------------------------------------------------
2. ÎÊÌ⣺
fatal error C1083: Cannot open include file: 'dxtrans.h': No such file or directory
½â¾ö£º
°²×°DX ......
±¾ÈËÔÚ×ö±ÏÉèµÄʱºòÓöµ½µÄһЩÎÊÌ⣬ÔÚÕâÀï×ܽáһϣ¬Ï£Íû»á¶Ô´ó¼ÒÓÐЩ°ïÖú~Óв»×ãÖ®´¦»¹ÍûÖ¸³ö£¬´ó¼Ò¹²Í¬½ø²½^_^
Ò»¡¢»ù±¾½éÉÜ£º
1.ÔËÐл·¾³VC6.0£¨Microsoft Visual C++ 6.0£©£¨http://40.duote.org/microsoft_visualc6.zip£©
2.¿ÎÌâÏà¹ØÄÚÈÝ£ºAVSÊÓƵ±àÂë
¶þ¡¢³öÏÖµÄÎÊÌâ¼°½â¾ö·½·¨£º
1.ÎÊÌ⣺
fatal error C1083:"Cannot open include file: 'Dshow.h': No such file or directoryÖ´ÐÐ cl.exe ʱ³ö´í"
½â¾ö£º
°²×°DirectX SDK(Nov_08°æ)£¨ http://download.microsoft.com/download/5/8/2/58223f79-689d-47ae-bdd0-056116ee8d16/DXSDK_Nov08.exe£©
Platform SDK(PSDK-x86)£¨http://download.microsoft.com/download/a/5/f/a5f0d781-e201-4ab6-8c6a-9bb4efed1e1a/PSDK-x86.exe£©
ÔÚTools£>OptionµÄÑ¡ÏdirectoriesÖÐÔö¼ÓÏàÓ¦ÏîÄ¿¡£
ÔÚInclude filesÔö¼ÓDirectX£¬DirectShowµÄInclude·¾¶£¬ÔÚLibrary filesÖÐÔö¼ÓDirectX£¬DirectShowµÄLib·¾¶¡£
------------------------------------------------------------------
2. ÎÊÌ⣺
fatal error C1083: Cannot open include file: 'dxtrans.h': No such file or directory
½â¾ö£º
°²×°DX ......
Êý×éÊÇÀàÐÍÏàͬµÄ¶ÔÏóµÄÐòÁУ¬ÆäÖеĶÔÏó³ÆΪÊý×éÔªËØ¡£Ò²¿ÉÒÔ½«Êý×éÏëÏñ³ÉÒ»Á¬´®µÄÓÃϱêÖµ±àºÅµÄÏàÁÚ´æ´¢Çø¡£
¿ÉÄÜÔÚijЩ±à³ÌÓïÑÔÖУ¬Ò»¸öϱê±äÁ¿ÊDz»ÔÊÐí³¬³öÊý×鶨ÒåÖÐËùÉèµÄ½çÏ޵ġ£µ«ÊÇÔÚCºÍC++ÖУ¬Êý×éÊÇûÓÐÕâÖÖ°²È«´ëÊ©µÄ¡£ÏÂÃæÏÈÀ´¿´¿´Êý×éϱêÔ½½çµÄ¼¸ÖÖÒì³£½á¹û¡£
Àý1£¬·ÃÎÊûÓзÖÅä¸øÊý×éµÄÄÚ´æ¿Õ¼ä¡£
int main ()
{
const int SIZE = 4;
int a[SIZE] = {12,40,45,10};
for (int i = 0; i<5 : i++)
cout << "\t a[" << i << "] = " << a[i] << endl;
}
&nbs ......
Êý×éÊÇÀàÐÍÏàͬµÄ¶ÔÏóµÄÐòÁУ¬ÆäÖеĶÔÏó³ÆΪÊý×éÔªËØ¡£Ò²¿ÉÒÔ½«Êý×éÏëÏñ³ÉÒ»Á¬´®µÄÓÃϱêÖµ±àºÅµÄÏàÁÚ´æ´¢Çø¡£
¿ÉÄÜÔÚijЩ±à³ÌÓïÑÔÖУ¬Ò»¸öϱê±äÁ¿ÊDz»ÔÊÐí³¬³öÊý×鶨ÒåÖÐËùÉèµÄ½çÏ޵ġ£µ«ÊÇÔÚCºÍC++ÖУ¬Êý×éÊÇûÓÐÕâÖÖ°²È«´ëÊ©µÄ¡£ÏÂÃæÏÈÀ´¿´¿´Êý×éϱêÔ½½çµÄ¼¸ÖÖÒì³£½á¹û¡£
Àý1£¬·ÃÎÊûÓзÖÅä¸øÊý×éµÄÄÚ´æ¿Õ¼ä¡£
int main ()
{
const int SIZE = 4;
int a[SIZE] = {12,40,45,10};
for (int i = 0; i<5 : i++)
cout << "\t a[" << i << "] = " << a[i] << endl;
}
&nbs ......
//ÊäÈë²ÎÊý£º*str ËÑË÷×Ö·û´®
// subStrLen ÓÃÓÚ·µ»ØÕÒµ½µÄ×î´ó×Ó×Ö·û´®³¤¶È
//·µ»Ø£ºÕÒµ½µÄ×î´ó×Ó×Ö·û´®Ö¸Õë
char * findMaxSubStr(char *str, int &subStrLen){
char *subStr;
char *p = str;
int index[256] ;
for (int ix = 0; ix < sizeof(index)/sizeof(index[0]); ix++)
{
index[ix] = -1;
}
int subStrPos = 0; // ×Ó×Ö·û´®ÔÚ×Ö·û´®strÖеÄÆ«ÒÆ
int charPos = 0; // µ±Ç°×Ö·ûÔÚ×Ö·û´®strÖеÄÆ«ÒÆ
int currLen = 0; //µ±Ç°×Ó×Ö·û´®³¤¶È
int maxLen = 0; //ÒѾÕÒµ½µÄ×î´ó×Ó×Ö·û´®³¤¶È
char ch;
while (ch = *p)
{
if (index[ch] < subStrPos){ //×Ö·ûÊ״γöÏÖ »òÕß ×Ö·ûÔÚ×Ó×Ö·û´®¿ªÊ¼µÄλÖúóÊ״γöÏÖ
index[ch] = charPos;
currLen++;
}else {
currLen = charPos - index[ch];
subStrPos = ++index[ch];
index[ch] = charPos;
}
if (currLen > maxLen)
{
subStr = str + subStrPos;
maxLen = currLen;
}
p++;
charPos++;
}
subStrLen = maxLen;
return subStr;
} ......
//ÊäÈë²ÎÊý£º*str ËÑË÷×Ö·û´®
// subStrLen ÓÃÓÚ·µ»ØÕÒµ½µÄ×î´ó×Ó×Ö·û´®³¤¶È
//·µ»Ø£ºÕÒµ½µÄ×î´ó×Ó×Ö·û´®Ö¸Õë
char * findMaxSubStr(char *str, int &subStrLen){
char *subStr;
char *p = str;
int index[256] ;
for (int ix = 0; ix < sizeof(index)/sizeof(index[0]); ix++)
{
index[ix] = -1;
}
int subStrPos = 0; // ×Ó×Ö·û´®ÔÚ×Ö·û´®strÖеÄÆ«ÒÆ
int charPos = 0; // µ±Ç°×Ö·ûÔÚ×Ö·û´®strÖеÄÆ«ÒÆ
int currLen = 0; //µ±Ç°×Ó×Ö·û´®³¤¶È
int maxLen = 0; //ÒѾÕÒµ½µÄ×î´ó×Ó×Ö·û´®³¤¶È
char ch;
while (ch = *p)
{
if (index[ch] < subStrPos){ //×Ö·ûÊ״γöÏÖ »òÕß ×Ö·ûÔÚ×Ó×Ö·û´®¿ªÊ¼µÄλÖúóÊ״γöÏÖ
index[ch] = charPos;
currLen++;
}else {
currLen = charPos - index[ch];
subStrPos = ++index[ch];
index[ch] = charPos;
}
if (currLen > maxLen)
{
subStr = str + subStrPos;
maxLen = currLen;
}
p++;
charPos++;
}
subStrLen = maxLen;
return subStr;
} ......
ÔÎÄ£º
http://www.codeproject.com/cpp/complex_declarations.asp
×÷ÕߣºVikram A Punathambekar
½éÉÜ
Ôø¾Åöµ½¹ýÈÃÄãÃԻ󲻽⡢ÀàËÆÓÚint * (* (*fp1) (int) ) [10];ÕâÑùµÄ±äÁ¿ÉùÃ÷Â𣿱¾ÎĽ«ÓÉÒ×µ½ÄÑ£¬Ò»²½Ò»²½½Ì»áÄãÈçºÎÀí½âÕâÖÖ¸´ÔÓµÄC/C++ÉùÃ÷£ºÎÒÃǽ«´ÓÿÌ춼ÄÜÅöµ½µÄ½Ï¼òµ¥µÄÉùÃ÷ÈëÊÖ£¬È»ºóÖð²½¼ÓÈëconstÐÞÊηûºÍtypedef£¬»¹Óк¯ÊýÖ¸Õ룬×îºó½éÉÜÒ»¸öÄܹ»ÈÃÄã׼ȷµØÀí½âÈκÎC/C++ÉùÃ÷µÄ“ÓÒ×ó·¨Ôò”¡£ÐèҪǿµ÷һϵÄÊÇ£¬¸´ÔÓµÄC/C++ÉùÃ÷²¢²»ÊǺõıà³Ì·ç¸ñ£»ÎÒÕâÀï½ö½öÊǽÌÄãÈçºÎÈ¥Àí½âÕâЩÉùÃ÷¡£×¢Ò⣺ΪÁ˱£Ö¤Äܹ»ÔÚͬһÐÐÉÏÏÔʾ´úÂëºÍÏà¹Ø×¢ÊÍ£¬±¾ÎÄ×îºÃÔÚÖÁÉÙ1024x768·Ö±æÂʵÄÏÔʾÆ÷ÉÏÔĶÁ¡£
»ù´¡
ÈÃÎÒÃÇ´ÓÒ»¸ö·Ç³£¼òµ¥µÄÀý×Ó¿ªÊ¼£¬ÈçÏ£º
int n;
Õâ¸öÓ¦¸Ã±»Àí½âΪ“declare n as an int”£¨nÊÇÒ»¸öintÐ͵ıäÁ¿£©¡£
½ÓÏÂÈ¥À´¿´Ò»ÏÂÖ¸Õë±äÁ¿£¬ÈçÏ£º
int *p;
Õâ¸öÓ¦¸Ã±»Àí½âΪ“declare p as an int *”£¨pÊÇÒ»¸öint *Ð͵ıäÁ¿£©£¬»òÕß˵pÊÇÒ»¸öÖ¸ÏòÒ»¸öintÐͱäÁ¿µÄÖ¸Õë¡£ÎÒÏëÔÚÕâÀïÕ¹¿ªÌÖÂÛһϣºÎÒ¾õµÃÔÚÉùÃ÷Ò»¸öÖ¸Õ루»òÒýÓã©ÀàÐ͵ıäÁ¿Ê±£¬×îºÃ½«*£¨»ò&£©Ð´ÔÚ½ô¿¿±äÁ¿Ö®Ç°£¬¶ø²»Êǽô¸ú»ù±¾ÀàÐÍÖ®ºó¡ ......
ÔÎÄ£º
http://www.codeproject.com/cpp/complex_declarations.asp
×÷ÕߣºVikram A Punathambekar
½éÉÜ
Ôø¾Åöµ½¹ýÈÃÄãÃԻ󲻽⡢ÀàËÆÓÚint * (* (*fp1) (int) ) [10];ÕâÑùµÄ±äÁ¿ÉùÃ÷Â𣿱¾ÎĽ«ÓÉÒ×µ½ÄÑ£¬Ò»²½Ò»²½½Ì»áÄãÈçºÎÀí½âÕâÖÖ¸´ÔÓµÄC/C++ÉùÃ÷£ºÎÒÃǽ«´ÓÿÌ춼ÄÜÅöµ½µÄ½Ï¼òµ¥µÄÉùÃ÷ÈëÊÖ£¬È»ºóÖð²½¼ÓÈëconstÐÞÊηûºÍtypedef£¬»¹Óк¯ÊýÖ¸Õ룬×îºó½éÉÜÒ»¸öÄܹ»ÈÃÄã׼ȷµØÀí½âÈκÎC/C++ÉùÃ÷µÄ“ÓÒ×ó·¨Ôò”¡£ÐèҪǿµ÷һϵÄÊÇ£¬¸´ÔÓµÄC/C++ÉùÃ÷²¢²»ÊǺõıà³Ì·ç¸ñ£»ÎÒÕâÀï½ö½öÊǽÌÄãÈçºÎÈ¥Àí½âÕâЩÉùÃ÷¡£×¢Ò⣺ΪÁ˱£Ö¤Äܹ»ÔÚͬһÐÐÉÏÏÔʾ´úÂëºÍÏà¹Ø×¢ÊÍ£¬±¾ÎÄ×îºÃÔÚÖÁÉÙ1024x768·Ö±æÂʵÄÏÔʾÆ÷ÉÏÔĶÁ¡£
»ù´¡
ÈÃÎÒÃÇ´ÓÒ»¸ö·Ç³£¼òµ¥µÄÀý×Ó¿ªÊ¼£¬ÈçÏ£º
int n;
Õâ¸öÓ¦¸Ã±»Àí½âΪ“declare n as an int”£¨nÊÇÒ»¸öintÐ͵ıäÁ¿£©¡£
½ÓÏÂÈ¥À´¿´Ò»ÏÂÖ¸Õë±äÁ¿£¬ÈçÏ£º
int *p;
Õâ¸öÓ¦¸Ã±»Àí½âΪ“declare p as an int *”£¨pÊÇÒ»¸öint *Ð͵ıäÁ¿£©£¬»òÕß˵pÊÇÒ»¸öÖ¸ÏòÒ»¸öintÐͱäÁ¿µÄÖ¸Õë¡£ÎÒÏëÔÚÕâÀïÕ¹¿ªÌÖÂÛһϣºÎÒ¾õµÃÔÚÉùÃ÷Ò»¸öÖ¸Õ루»òÒýÓã©ÀàÐ͵ıäÁ¿Ê±£¬×îºÃ½«*£¨»ò&£©Ð´ÔÚ½ô¿¿±äÁ¿Ö®Ç°£¬¶ø²»Êǽô¸ú»ù±¾ÀàÐÍÖ®ºó¡ ......