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

½«Àà³ÉÔ±º¯ÊýÓÃ×öC»Øµ÷º¯Êý

Ìá³öÎÊÌ⣺
»Øµ÷º¯ÊýÊÇ»ùÓÚC±à³ÌµÄWindows SDKµÄ¼¼Êõ£¬²»ÊÇÕë¶ÔC++µÄ£¬³ÌÐòÔ±¿ÉÒÔ½«Ò»¸öCº¯ÊýÖ±½Ó×÷Ϊ»Øµ÷º¯Êý£¬µ«ÊÇÈç¹ûÊÔͼֱ½ÓʹÓÃC++µÄ³ÉÔ±º¯Êý×÷Ϊ»Øµ÷º¯Êý½«·¢Éú´íÎó£¬ÉõÖÁ±àÒë¾Í²»ÄÜͨ¹ý¡£
·ÖÎöÔ­Òò£º
ÆÕͨµÄC++³ÉÔ±º¯Êý¶¼Òþº¬ÁËÒ»¸ö´«µÝº¯Êý×÷Ϊ²ÎÊý£¬Ò༴“this”Ö¸Õ룬C++ͨ¹ý´«µÝÒ»¸öÖ¸Ïò×ÔÉíµÄÖ¸Õë¸øÆä³ÉÔ±º¯Êý´Ó¶øʵÏÖ³ÌÐòº¯Êý¿ÉÒÔ·ÃÎÊC++µÄÊý¾Ý³ÉÔ±¡£ÕâÒ²¿ÉÒÔÀí½âΪʲôC++ÀàµÄ¶à¸öʵÀý¿ÉÒÔ¹²Ïí³ÉÔ±º¯Êýµ«ÊÇÈ·Óв»Í¬µÄÊý¾Ý³ÉÔ±¡£ÓÉÓÚthisÖ¸ÕëµÄ×÷Óã¬Ê¹µÃ½«Ò»¸öCALLBACKÐ͵ijÉÔ±º¯Êý×÷Ϊ»Øµ÷º¯Êý°²×°Ê±¾Í»áÒòΪÒþº¬µÄthisÖ¸ÕëʹµÃº¯Êý²ÎÊý¸öÊý²»Æ¥Å䣬´Ó¶øµ¼Ö»ص÷º¯Êý°²×°Ê§°Ü
½â¾ö·½°¸£º
Ò»,²»Ê¹ÓóÉÔ±º¯Êý£¬Ö±½ÓʹÓÃÆÕͨCº¯Êý£¬ÎªÁËʵÏÖÔÚCº¯ÊýÖпÉÒÔ·ÃÎÊÀàµÄ³ÉÔ±±äÁ¿£¬¿ÉÒÔʹÓÃÓÑÔª²Ù×÷·û(friend)£¬ÔÚC++Öн«¸ÃCº¯Êý˵Ã÷ΪÀàµÄÓÑÔª¼´¿É¡£ÕâÖÖ´¦Àí»úÖÆÓëÆÕͨµÄC±à³ÌÖÐʹÓûص÷º¯ÊýÒ»Ñù¡£
¶þ,ʹÓþ²Ì¬³ÉÔ±º¯Êý£¬¾²Ì¬³ÉÔ±º¯Êý²»Ê¹ÓÃthisÖ¸Õë×÷ΪÒþº¬²ÎÊý£¬ÕâÑù¾Í¿ÉÒÔ×÷Ϊ»Øµ÷º¯ÊýÁË¡£¾²Ì¬³ÉÔ±º¯Êý¾ßÓÐÁ½´óÌص㣺ÆäÒ»£¬¿ÉÒÔÔÚûÓÐÀàʵÀýµÄÇé¿öÏÂʹÓã»Æä¶þ£¬Ö»ÄÜ·ÃÎʾ²Ì¬³ÉÔ±±äÁ¿ºÍ¾²Ì¬³ÉÔ±º¯Êý£¬²»ÄÜ·ÃÎʷǾ²Ì¬³ÉÔ±±äÁ¿ºÍ·Ç¾²Ì¬³ÉÔ±º¯Êý¡£ÓÉÓÚÔÚC++ÖÐʹÓÃÀà³ÉÔ±º¯Êý×÷Ϊ»Øµ÷º¯ÊýµÄÄ¿µÄ¾ÍÊÇΪÁË·ÃÎÊËùÓеijÉÔ±±äÁ¿ºÍ³ÉÔ±º¯Êý£¬Èç¹û×÷²»µ½ÕâÒ»µã½«²»¾ßÓÐʵ¼ÊÒâÒå¡£ÎÒÃÇͨ¹ýʹÓþ²Ì¬³ÉÔ±º¯Êý¶Ô·Ç¾²Ì¬³ÉÔ±º¯Êý°ü×°µÄ°ì·¨À´½â¾öÎÊÌâ¡£ÀàʵÀý¿ÉÒÔͨ¹ý¸½¼Ó²ÎÊý»òÈ«¾Ö±äÁ¿µÄ·½Ê½µÄ·½Ê½´«µÝµ½¾²Ì¬³ÉÔ±º¯ÊýÖС£·Ö±ð¾ÙÀýÈçÏ£º
1£¬²ÎÊý´«µÝµÄ·½Ê½
   #include <iostream.h>  
   class TClassA
   {
   public:
      void Display(const char* text) { cout << text << endl; };
      static void Wrapper_To_Call_Display(void* pt2Object, char* text);
      // more....
   };
   // ¾²Ì¬°ü×°º¯Êý£¬Äܹ»µ÷ÓóÉÔ±º¯ÊýDisplay(),±¾Éí×öΪ»Øµ÷º¯ÊýÀ´Ê¹ÓÃ
   void TClassA::Wrapper_To_Call_Display(void* pt2Object, char* string)
   {
       // ÏÔʽÀàÐÍת»»
       TClassA* mySelf = (TClassA*) pt2Object;
     &n


Ïà¹ØÎĵµ£º

ÍƼö¼¸¸öÍøÉϵÄC/C++×ÊÔ´(zt)

 2009-11-01   17:31:00
1¡¢Standard C£¬°üÀ¨»ù±¾µÄÓï·¨¶¨Ò壬¿âº¯Êý²Î¿¼
http://www-ccs.ucsd.edu/c/
»òÕß
The C Library Reference Guide
http://www.acm.uiuc.edu/webmonkeys/book/c_guide/
2¡¢The UNIX Programming Environment
http://www.iu.hio.no/~mark/unix/unix_toc.html
»ò
The Art of ......

ÃÀ¹úרÀû·¨Ìõ¿î102(c),102(d)

www.us-ip.com
ÃÀ¹úרÀû·¨Ìõ¿î102(c),102(d)
35 U.S.C. 102:
A person shall be entitled to a patent unless -
(c) he has abandoned the invention
102(c)Ìõ¿îÖ¸³öÈç¹û·¢Ã÷ÈËÒÅÆúÁË·¢Ã÷£¬ÄÇô·¢Ã÷È˽«²»ÄÜ»ñµÃÃÀ¹úרÀû¡£·¢Ã÷ÈËÒÅÆú·¢Ã÷±ØÐëÊǹÊÒâµÄÐÐΪ£¬²¢ÇÒÒâͼ½«ÒÅÆúµÄ·¢Ã÷·îÏ׸øÉç»á¡£·¢Ã÷È˲»Ò»¶¨ÐèÒª¹«¿ªÐûÊ¾Õ ......

B/S C/S½á¹¹¶¨ÒåµÄÏê½âºÍÇø±ð

 b/s ÊÇ brower/server ¾ÍÊÇÓÃä¯ÀÀÆ÷(Èçie)ΪӦÓóÌÐò¿Í»§¶Ë²Ù×÷·þÎñÆ÷¡£ÕâÑùÓÃä¯ÀÀÆ÷À´²Ù×÷¼òµ¥Ò×Ó㬵«ÊǶÔÊäÈëûÓкܺõÄÑéÖ¤¡£Âß¼­ÊµÏÖ²»¶à¡£±¾µØÖ»ÊÇÓÃÓÚ»ñÈ¡Êý¾ÝÈ»ºó´ó²¿·ÖÑéÖ¤ÐèÒªÌá½»·þÎñÆ÷À´Íê³É¡£
c/s ÊÇclient/server ¿Í»§¶ËÈí¼þÔòÊÇÒ»¸öÓµÓкܶàÂß¼­ÑéÖ¤µÄÈí¼þ£¬±¾µØÑéÖ¤³É¹¦ºó²ÅÌá½»·þÎñÆ÷¡£
ÎÒÕÒµ½µÄ¸ ......

C/C++ÖеÄÄÚ´æ²¹Æë»úÖÆ

      ÔÚCÓïÑÔÖУ¬½á¹¹ÊÇÒ»ÖÖ¸´ºÏÊý¾ÝÀàÐÍ£¬Æä¹¹³ÉÔªËؼȿÉÒÔÊÇ»ù±¾Êý¾ÝÀàÐÍ£¨Èçint¡¢long¡¢floatµÈ£©µÄ±äÁ¿£¬Ò²¿ÉÒÔÊÇһЩ¸´ºÏÊý¾ÝÀàÐÍ£¨ÈçÊý×é¡¢½á¹¹¡¢ÁªºÏµÈ£©µÄÊý¾Ýµ¥Ôª¡£ÔڽṹÖУ¬±àÒëÆ÷Ϊ½á¹¹µÄÿ¸ö³ÉÔ±°´Æä×ÔÈ»¶Ô½ç£¨alignment£©Ìõ¼þ·ÖÅä¿Õ¼ä¡£¸÷¸ö³ÉÔ±°´ÕÕËüÃDZ»ÉùÃ÷µÄ˳ÐòÔÚÄÚ´æÖÐ˳Ðò´ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ