Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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£«£«Ð´CGI³ÌÐò

 ÓÃC/C£«£«Ð´CGI³ÌÐò
    ʹÓÃCGIC¿âµÄ¼òÒª£º
    ¿âµÄº¯Êý˵Ã÷£º http://www.boutell.com/cgic/#cgiFormStringNoNewlines
    1. ´òÓ¡CGI±ê×¼Êä³öÍ·²¿£º
    cgiHeaderContentType£¨"text/plain"£©£»
    »òÕߣº
  ......

extern "C"Ïê½â

       C++ÓïÑԵĴ´½¨³õÖÔÊÇ“a better
C”£¬µ«ÊÇÕâ²¢²»Òâζ×ÅC++ÖÐÀàËÆCÓïÑÔµÄÈ«¾Ö±äÁ¿ºÍº¯ÊýËù²ÉÓõıàÒëºÍÁ¬½Ó·½Ê½ÓëCÓïÑÔÍêÈ«Ïàͬ¡£×÷ΪһÖÖÓûÓëC¼æÈݵÄÓïÑÔ£¬C++±£ÁôÁËÒ»²¿·Ö¹ý³Ì
ʽÓïÑÔµÄÌص㣨±»ÊÀÈ˳ÆΪ“²»³¹µ×µØÃæÏò¶ÔÏ󔣩£¬Òò¶øËü¿ÉÒÔ¶¨Òå²»ÊôÓÚÈκÎÀàµÄ ......

ADC0809 C³ÌÐò

 #include<reg52.h>
#include<intrins.h>
#define uint  unsigned int
#define uchar unsigned char
uint date;
uchar mm=0,n=0;
uint k1,k2,k3,k4,k5,k6;
uchar code b[]={
    0x3f,0x06,0x5b,0x4f,0x66,   //0,1,2,3,4,
    0x6d,0x7d,0x07,0x7 ......

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

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

cÄÚ´æ·ÖÅä

ÄÚ´æ·ÖÅ䷽ʽÓÐÈýÖÖ£º
£¨1£© ´Ó¾²Ì¬´æ´¢ÇøÓò·ÖÅä¡£ÄÚ´æÔÚ³ÌÐò±àÒëµÄʱºò¾ÍÒѾ­·ÖÅäºÃ£¬Õâ¿éÄÚ´æÔÚ³ÌÐòµÄ
Õû¸öÔËÐÐÆڼ䶼´æÔÚ¡£ÀýÈçÈ«¾Ö±äÁ¿£¬static ±äÁ¿¡£
£¨2£© ÔÚÕ»ÉÏ´´½¨¡£ÔÚÖ´Ðк¯Êýʱ£¬º¯ÊýÄÚ¾Ö²¿±äÁ¿µÄ´æ´¢µ¥Ôª¶¼¿ÉÒÔÔÚÕ»ÉÏ´´½¨£¬º¯
ÊýÖ´ÐнáÊøʱÕâЩ´æ´¢µ¥Ôª×Ô¶¯±»ÊÍ·Å¡£Õ»ÄÚ´æ·ÖÅäÔËËãÄÚÖÃÓÚ´¦ÀíÆ÷µÄÖ¸Áî¼ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ