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

C¸´ÔÓÉùÃ÷½âÎö

CÓïÑÔËùÓи´ÔÓµÄÖ¸ÕëÉùÃ÷£¬¶¼ÊÇÓɸ÷ÖÖÉùÃ÷ǶÌ×¹¹³ÉµÄ¡£ÈçºÎ½â¶Á¸´ÔÓÖ¸ÕëÉùÃ÷ÄØ£¿ÓÒ×ó·¨ÔòÊÇÒ»¸ö¼ÈÖøÃûÓÖ³£Óõķ½·¨¡£²»¹ý£¬ÓÒ×ó·¨ÔòÆäʵ²¢²»ÊÇC±ê×¼ÀïÃæµÄÄÚÈÝ£¬ËüÊÇ´ÓC±ê×¼µÄÉùÃ÷¹æ¶¨ÖйéÄɳöÀ´µÄ·½·¨¡£C±ê×¼µÄÉùÃ÷¹æÔò£¬ÊÇÓÃÀ´½â¾öÈçºÎ´´½¨ÉùÃ÷µÄ£¬¶øÓÒ×ó·¨ÔòÊÇÓÃÀ´½â¾öÈçºÎ±çʶһ¸öÉùÃ÷µÄ£¬Á½Õß¿ÉÒÔ˵ÊÇÏà·´µÄ¡£ÓÒ×ó·¨ÔòµÄÓ¢ÎÄÔ­ÎÄÊÇÕâÑù˵µÄ£º
The right-left rule: Start reading the declaration from the innermost parentheses, go right, and then go left. When you encounter parentheses, the direction should be reversed. Once everything in the parentheses has been parsed, jump out of it. Continue till the whole declaration has been parsed.
Õâ¶ÎÓ¢Îĵķ­ÒëÈçÏ£º
ÓÒ×ó·¨Ôò£ºÊ×ÏÈ´Ó×îÀïÃæµÄÔ²À¨ºÅ¿´Æð£¬È»ºóÍùÓÒ¿´£¬ÔÙÍù×ó¿´¡£Ã¿µ±Óöµ½Ô²À¨ºÅʱ£¬¾ÍÓ¦¸ÃµôתÔĶÁ·½Ïò¡£Ò»µ©½âÎöÍêÔ²À¨ºÅÀïÃæËùÓеĶ«Î÷£¬¾ÍÌø³öÔ²À¨ºÅ¡£Öظ´Õâ¸ö¹ý³ÌÖ±µ½Õû¸öÉùÃ÷½âÎöÍê±Ï¡£
        ±ÊÕßÒª¶ÔÕâ¸ö·¨Ôò½øÐÐÒ»¸öССµÄÐÞÕý£¬Ó¦¸ÃÊÇ´Ó䶨ÒåµÄ±êʶ·û¿ªÊ¼ÔĶÁ£¬¶ø²»ÊÇ´ÓÀ¨ºÅ¶ÁÆð£¬Ö®ËùÒÔÊÇ䶨ÒåµÄ±êʶ·û£¬ÊÇÒòΪһ¸öÉùÃ÷ÀïÃæ¿ÉÄÜÓжà¸ö±êʶ·û£¬µ«Î´¶¨ÒåµÄ±êʶ·ûÖ»»áÓÐÒ»¸ö¡£
        ÏÖÔÚͨ¹ýһЩÀý×ÓÀ´ÌÖÂÛÓÒ×ó·¨ÔòµÄÓ¦Óã¬ÏÈ´Ó×î¼òµ¥µÄ¿ªÊ¼£¬Öð²½¼ÓÉ
int (*func)(int *p);
Ê×ÏÈÕÒµ½ÄǸö䶨ÒåµÄ±êʶ·û£¬¾ÍÊÇfunc£¬ËüµÄÍâÃæÓÐÒ»¶ÔÔ²À¨ºÅ£¬¶øÇÒ×ó±ßÊÇÒ»¸ö*ºÅ£¬Õâ˵Ã÷funcÊÇÒ»¸öÖ¸Õ룬ȻºóÌø³öÕâ¸öÔ²À¨ºÅ£¬ÏÈ¿´Óұߣ¬Ò²ÊÇÒ»¸öÔ²À¨ºÅ£¬Õâ˵Ã÷(*func)ÊÇÒ»¸öº¯Êý£¬¶øfuncÊÇÒ»¸öÖ¸ÏòÕâÀຯÊýµÄÖ¸Õ룬¾ÍÊÇÒ»¸öº¯ÊýÖ¸Õ룬ÕâÀຯÊý¾ßÓÐint*ÀàÐ͵ÄÐβΣ¬·µ»ØÖµÀàÐÍÊÇint¡£
int (*func)(int *p, int (*f)(int*));
func±»Ò»¶ÔÀ¨ºÅ°üº¬£¬ÇÒ×ó±ßÓÐÒ»¸ö*ºÅ£¬ËµÃ÷funcÊÇÒ»¸öÖ¸Õ룬Ìø³öÀ¨ºÅ£¬ÓÒ±ßÒ²ÓиöÀ¨ºÅ£¬ÄÇôfuncÊÇÒ»¸öÖ¸Ïòº¯ÊýµÄÖ¸Õ룬ÕâÀຯÊý¾ßÓÐint *ºÍint (*)(int*)ÕâÑùµÄÐβΣ¬·µ»ØֵΪintÀàÐÍ¡£ÔÙÀ´¿´Ò»¿´funcµÄÐβÎint (*f)(int*)£¬ÀàËÆÇ°ÃæµÄ½âÊÍ£¬fÒ²ÊÇÒ»¸öº¯ÊýÖ¸Õ룬ָÏòµÄº¯Êý¾ßÓÐint*ÀàÐ͵ÄÐβΣ¬·µ»ØֵΪint¡£
int (*func[5])(int *p);
funcÓÒ±ßÊÇÒ»¸ö[]ÔËËã·û£¬ËµÃ÷funcÊÇÒ»¸ö¾ßÓÐ5¸öÔªËصÄÊý×飬funcµÄ×ó±ßÓÐÒ»¸ö*£¬ËµÃ÷funcµÄÔªËØÊÇÖ¸Õ룬ҪעÒâÕâÀïµÄ*²»ÊÇÐÞÊÎfuncµÄ£¬¶øÊÇÐÞÊÎfunc[5]µÄ£¬Ô­ÒòÊÇ[]ÔËËã·ûÓÅÏȼ¶±È*¸ß£¬funcÏȸú[]½áºÏ£¬Òò´Ë*ÐÞÊεÄÊÇ


Ïà¹ØÎĵµ£º

´Óbmpת»»¹¤¾ßÉú³ÉµÄcÎļþÖлñµÃbitmapͼÏñÊä³ö

ÔÚº¯ÊýÌåÖÐÌí¼ÓÒÔÏ´úÂë:×¢£ºmemcpyÖеÄbitmapΪbmpÉú³ÉµÄcÎļþÊý×éÃû
 int width = 533;
  int height = 615;  
  BYTE* DDBdata=new BYTE[width*height*2];
  BYTE* DIBdata;
  memcpy(DDBdata,(void *)bitmap,width*height*2);
  
   ......

¹ØÓÚperlÖкÍCÖеÄsort»úÖÆ £¨×ªÔØ£©

¹ØÓÚperlÖкÍCÖеÄsort»úÖÆ
£¨×ªÔØ£©
ϸ¶ÁC++ primer£¬ÖÕÓÚÀí½âÁËÒ»Ö±±È½ÏÒÉ»óµÄperlºÍCµÄsortº¯Êý»úÖÆ¡£ÎÒµ½²»ÊÇÒÉ»óËüµÄÓ÷¨£¬¶øÊǺÜÒÉ»óËüµÄÐÎʽ£¬ÎªÊ²Ã´Òª´«µÝÒ»¸ö×Ó³ÌÐòµÄÄäÃûÒýÓøøËüÄØ£¬¶øÇÒÐÎʽ»¹ºÜ¹Å¹Ö£¬Ò»¶¨ÒªÊÇ$a<$b£¬$a<=>$bÖ®ÀàµÄ¡£ÒªÇóÑϸñÇҹŹ֡£
½ñҹͻȻ¿´µ½p.384Ò³£¬¿´µ½ÊéÉ϶ÔquicksortÅÅ ......

C/S ÓëB/S¼Ü¹¹Çø±ðÏê½â£¨×ª£©

Ò»¡¢Ê²Ã´ÊÇC/SºÍB/S
ÒªÏë¶Ô“C/S”ºÍ“B/S”¼¼Êõ·¢Õ¹±ä»¯ÓÐËùÁ˽⣬Ê×ÏȱØÐë¸ãÇå³þÈý¸öÎÊÌâ¡£
µÚÒ»¡¢Ê²Ã´ÊÇC/S½á¹¹¡£
C/S £¨Client/Server£©½á¹¹£¬¼´´ó¼ÒÊìÖªµÄ¿Í»§»úºÍ·þÎñÆ÷½á¹¹¡£ËüÊÇÈí¼þϵͳÌåϵ½á¹¹£¬Í¨¹ýËü¿ÉÒÔ³ä·ÖÀûÓÃÁ½¶ËÓ²¼þ»·¾³µÄÓÅÊÆ£¬½«ÈÎÎñºÏÀí·ÖÅäµ½Client¶ËºÍServer¶ËÀ´Ê ......

C++µÄÀàÓëCÀïÃæµÄstructµÄÇø±ð


C++µÄÀàÓëCÀïÃæµÄstructµÄÇø±ð
2009-10-11 15:32
¹ØÓÚʹÓôóÀ¨ºÅ³õʼ»¯
classºÍstructÈç¹û¶¨ÒåÁ˹¹Ô캯ÊýµÄ»°£¬¶¼²»ÄÜÓôóÀ¨ºÅ½øÐгõʼ»¯
Èç¹ûûÓж¨Òå¹¹Ô캯Êý£¬struct¿ÉÒÔÓôóÀ¨ºÅ³õʼ»¯¡£
Èç¹ûûÓж¨Òå¹¹Ô캯Êý£¬ÇÒËùÓгÉÔ±±äÁ¿È«ÊÇpublicµÄ»°£¬¿ÉÒÔÓôóÀ¨ºÅ³õʼ»¯¡£
¹ØÓÚĬÈÏ·ÃÎÊȨÏÞ
classÖÐĬÈϵijÉÔ±·ÃÎÊÈ ......

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

ÉùÃ÷£º±¾ÎÄתÔØ×Ô»¥ÁªÍø
Ò»¡¢Ö¸ÕëµÄÀàÐÍ
¶þ¡¢Ö¸ÕëËùÖ¸ÏòµÄÀàÐÍ
Èý¡¢Ö¸ÕëµÄÖµ»òÖ¸ÕëËùÖ¸ÏòµÄÄÚÔÚÇø
ËÄ¡¢Ö¸Õë±¾ÉíËùÕ¼¾ÝµÄÄÚÔÚÇø
1.Ö¸ÕëµÄÀàÐÍ£º
´ÓÓï·¨µÄ½Ç¶È¿´£¬ÄãÖ»Òª°ÑÖ¸ÕëÉùÃ÷Óï¾äÀïµÄÖ¸ÕëÃû×ÖÈ¥µô£¬Ê£ÏµIJ¿·Ö¾Í
ÊÇÕâ¸öÖ¸ÕëµÄÀàÐÍ¡£ÕâÊÇÖ¸Õë±¾ÉíËù¾ßÓеÄÀàÐÍ¡£ÈÃÎÒÃÇ¿´¿´ÒÔϸ÷¸öÖ¸ÕëµÄ
ÀàÐÍ£º
(1)int *ptr ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ