Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

µÚÒ»Õ CÖ¸Õë¸ÅÄî

ÉùÃ÷£º±¾ÎÄתÔØ×Ô»¥ÁªÍø
Ò»¡¢Ö¸ÕëµÄÀàÐÍ
¶þ¡¢Ö¸ÕëËùÖ¸ÏòµÄÀàÐÍ
Èý¡¢Ö¸ÕëµÄÖµ»òÖ¸ÕëËùÖ¸ÏòµÄÄÚÔÚÇø
ËÄ¡¢Ö¸Õë±¾ÉíËùÕ¼¾ÝµÄÄÚÔÚÇø
1.Ö¸ÕëµÄÀàÐÍ£º
´ÓÓï·¨µÄ½Ç¶È¿´£¬ÄãÖ»Òª°ÑÖ¸ÕëÉùÃ÷Óï¾äÀïµÄÖ¸ÕëÃû×ÖÈ¥µô£¬Ê£ÏµIJ¿·Ö¾Í
ÊÇÕâ¸öÖ¸ÕëµÄÀàÐÍ¡£ÕâÊÇÖ¸Õë±¾ÉíËù¾ßÓеÄÀàÐÍ¡£ÈÃÎÒÃÇ¿´¿´ÒÔϸ÷¸öÖ¸ÕëµÄ
ÀàÐÍ£º
(1)int *ptr; //Ö¸ÕëµÄÀàÐÍÊÇint *
(2)char *ptr; //Ö¸ÕëµÄÀàÐÍÊÇchar *
(3)int **ptr; //Ö¸ÕëµÄÀàÐÍÊÇ int **
(4)int (*ptr)[3]; //Ö¸ÕëµÄÀàÐÍÊÇ int(*)[3]
(5)int *(*ptr)[4]; //Ö¸ÕëµÄÀàÐÍÊÇ int *(*)[4]  
2.Ö¸ÕëËùÖ¸ÏòµÄÀàÐÍ:
µ±Äãͨ¹ýÖ¸ÕëÀ´·ÃÎÊÖ¸ÕëËùÖ¸ÏòµÄÄÚ´æÇøʱ£¬Ö¸ÕëËùÖ¸ÏòµÄÀàÐ;ö¶¨Á˱àÒë
Æ÷½«°ÑÄÇƬÄÚ´æÇøÀïµÄÄÚÈݵ±×öʲôÀ´¿´´ý¡£
´ÓÓï·¨ÉÏ¿´£¬ÄãÖ»Ðë°ÑÖ¸ÕëÉùÃ÷Óï¾äÖеÄÖ¸ÕëÃû×ÖºÍÃû×Ö×ó±ßµÄÖ¸ÕëÉùÃ÷·û
*È¥µô£¬Ê£ÏµľÍÊÇÖ¸ÕëËùÖ¸ÏòµÄÀàÐÍ¡£ÀýÈ磺
(1)int *ptr; //Ö¸ÕëËùÖ¸ÏòµÄÀàÐÍÊÇint
(2)char *ptr; //Ö¸ÕëËùÖ¸ÏòµÄµÄÀàÐÍÊÇchar
(3)int **ptr; //Ö¸ÕëËùÖ¸ÏòµÄµÄÀàÐÍÊÇ int *
(4)int (*ptr)[3]; //Ö¸ÕëËùÖ¸ÏòµÄµÄÀàÐÍÊÇ int()[3]
(5)int *(*ptr)[4]; //Ö¸ÕëËùÖ¸ÏòµÄµÄÀàÐÍÊÇ int *()[4]
ÔÚÖ¸ÕëµÄËãÊõÔËËãÖУ¬Ö¸ÕëËùÖ¸ÏòµÄÀàÐÍÓкܴóµÄ×÷Óá£
Ö¸ÕëµÄÀàÐÍ(¼´Ö¸Õë±¾ÉíµÄÀàÐÍ)ºÍÖ¸ÕëËùÖ¸ÏòµÄÀàÐÍÊÇÁ½¸ö¸ÅÄî¡£µ±Äã¶ÔCÔ½
À´Ô½ÊìϤʱ£¬Äã»á·¢ÏÖ£¬°ÑÓëÖ¸Õë½ÁºÍÔÚÒ»ÆðµÄ"ÀàÐÍ"Õâ¸ö¸ÅÄî·Ö³É"Ö¸ÕëµÄ
ÀàÐÍ"ºÍ"Ö¸ÕëËùÖ¸ÏòµÄÀàÐÍ"Á½¸ö¸ÅÄÊǾ«Í¨Ö¸ÕëµÄ¹Ø¼üµãÖ®Ò»¡£
3. Ö¸ÕëµÄÖµ£¬»òÕß½ÐÖ¸ÕëËùÖ¸ÏòµÄÄÚ´æÇø»òµØÖ·:
Ö¸ÕëµÄÖµÊÇÖ¸Õë±¾Éí´æ´¢µÄÊýÖµ£¬Õâ¸öÖµ½«±»±àÒëÆ÷µ±×÷Ò»¸öµØÖ·£¬¶ø²»ÊÇ
Ò»¸öÒ»°ãµÄÊýÖµ¡£ÔÚ32λ³ÌÐòÀËùÓÐÀàÐ͵ÄÖ¸ÕëµÄÖµ¶¼ÊÇÒ»¸ö32λÕûÊý£¬ÒòΪ
32λ³ÌÐòÀïÄÚ´æµØÖ·È«¶¼ÊÇ32볤¶È¡£
Ö¸ÕëËùÖ¸ÏòµÄÄÚ´æÇø¾ÍÊÇ´ÓÖ¸ÕëµÄÖµËù´ú±íµÄÄǸöÄÚ´æµØÖ·¿ªÊ¼£¬³¤¶ÈΪ
sizeof(Ö¸ÕëËùÖ¸ÏòµÄÀàÐÍ)µÄһƬÄÚ´æÇø¡£ÒÔºó£¬ÎÒÃÇ˵һ¸öÖ¸ÕëµÄÖµÊÇXX£¬¾ÍÏà
µ±ÓÚ˵¸ÃÖ¸ÕëÖ¸ÏòÁËÒÔXXΪÊ×µØÖ·µÄһƬÄÚ´æÇøÓò£»ÎÒÃÇ˵һ¸öÖ¸ÕëÖ¸ÏòÁËij¿é
ÄÚ´æÇøÓò£¬¾ÍÏ൱ÓÚ˵¸ÃÖ¸ÕëµÄÖµÊÇÕâ¿éÄÚ´æÇøÓòµÄÊ×µØÖ·¡£
Ö¸ÕëËùÖ¸ÏòµÄÄÚ´æÇøºÍÖ¸ÕëËùÖ¸ÏòµÄÀàÐÍÊÇÁ½¸öÍêÈ«²»Í¬µÄ¸ÅÄî¡£ÔÚ1ÖеÄÀý×Ó
£¬Ö¸ÕëËùÖ¸ÏòµÄÀàÐÍÒѾ­ÓÐÁË£¬µ«ÓÉÓÚÖ¸Õ뻹δ³õʼ»¯£¬ËùÒÔËüËùÖ¸ÏòµÄÄÚ´æÇø
ÊDz»´æÔڵģ¬»òÕß˵ÊÇÎÞÒâÒåµÄ¡£
ÒÔºó£¬Ã¿Óöµ½Ò»¸öÖ¸Õ룬¶¼Ó¦¸ÃÎÊÎÊ£ºÕâ¸öÖ¸ÕëµÄÀàÐÍÊÇʲô£¿Ö¸ÕëÖ¸ÏòµÄ
ÀàÐÍÊÇʲô£¿¸ÃÖ¸ÕëÖ¸ÏòÁËÄ


Ïà¹ØÎĵµ£º

C typedefÏê½â¼°Óë#defineµÄÇø±ð

typedef ÉùÃ÷£¬¼ò³Æ typedef£¬ÎªÏÖÓÐÀàÐÍ´´½¨Ò»¸öеÄÃû×Ö¡£±ÈÈçÈËÃdz£³£Ê¹Óà typedef À´±àд¸üÃÀ¹ÛºÍ¿É¶ÁµÄ´úÂë¡£ËùνÃÀ¹Û£¬ÒâÖ¸ typedef ÄÜÒþ²Ø±¿×¾µÄÓï·¨¹¹ÔìÒÔ¼°Æ½Ì¨Ïà¹ØµÄÊý¾ÝÀàÐÍ£¬´Ó¶øÔöÇ¿¿ÉÒÆÖ²ÐÔºÍÒÔ¼°Î´À´µÄ¿Éά»¤ÐÔ¡£
µÚÒ»¡¢ËĸöÓÃ;
ÓÃ;һ£º
¶¨ÒåÒ»ÖÖÀàÐ͵ıðÃû£¬¶ø²»Ö»ÊǼòµ¥µÄºêÌæ»»¡£¿ÉÒÔÓÃ×÷ͬʱÉùÃ÷Ö¸ ......

realview MDK C/C++ »ìºÏ±à³ÌÎÊÌâ

Ç°¼¸Ìì¸ãÒ»¸öÏîÄ¿Éæ¼°µ½C/C++»ìºÏ±à³Ì£¬ÔÚKeilϱàÒëʱÌáʾ£º
error: #800:this declaration may not have extern "C" linkage
error: At end of source : #67:expected a "}"
µ±Ê±Á¢ÂíÏëµ½ÊÇCºÍC++±à³ÌʱÐèÒªextern "C"£¬ÂíÉÏÊÔÁËÊÔ£¬È»ºóÐû¸æʧ°Ü¡£
ÒòΪ˫»÷ºóÌáʾ³ö´íµÄµØ·½ÊÇtemplate<clase T>,ÒÔΪÊÇkeil²»Ö ......

ÇåÀíCÅÌ

ÎÒÖ»ÓÃÁËÆäÖеÄ15Ìõ£¬¾Í½ÚÊ¡ÁË40%µÄ¿Õ¼äÄØ£¬Ç¿ÁÒÍƼö
  Ö÷Òª½²½²windows²Ù×÷ϵͳÔÚCÅ̿ռ䲻×ãµÄÇé¿öÏ£¬ÎÒÃÇ¿ÉÒÔͨ¹ýÄÇЩ¾ßÌåÊÖ¶ÎÀ´Ôö¼ÓCÅ̿ռ䡣
  1.´ò¿ª“ÎҵĵçÄÔ”-“¹¤¾ß”-“Îļþ¼ÐÑ¡Ïî”-“²é¿´”-ÔÚ“ÏÔʾËùÓÐÎļþºÍÎļþ¼Ð”Ñ¡ÏîÇ°´ò¹´-“È ......

C¹«Ë¾×ܽá

È¥ÁËÌËC¹«Ë¾INTviewÁËһϣ¬Ê±¼äÓеã¾ÃÁË£¬¸Ã°ÑһЩÊÕ»ñÕûÀíÒ»ÏÂÁË£¬ÃâµÃÒÔºóÔÙ·¸¡£ 1, ¸öÐÔÐÔ¸ñ·½ÃæµÄÌáÎÊÀýÈ磺¸öÈËȱµã£¬ÎªÊ²Ã´¾õµÃ×Ô¼º±È±ðÈËʤÈι¤×÷£¬¸öÈË×îÂúÒâµÄʵȵÈÖ®À࣬ҪÈÏÕæµÄ×¼±¸Ò»Ï¡£ 2£¬C¹«Ë¾µÄ¼¼ÊõÈËÔ±²Î²î²»Æ룬²îµãµÄºÜ¿´ÖØÄãµÄ×ö¹ýµÄÏîÄ¿¾­Ñ飬¶øÇÒÒÔÊýÁ¿È¡Ê¤£¬ÕâÒ²¸ø×¼±¸ÃæÊÔµÄͬѧÌáÁ˸öÐÑ£¬²»Ò ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ