C_Êý¾ÝÀàÐÍת»»
Ô´Âë:
# include <stdio.h>
int main()
{
/* ¶¨Òå±äÁ¿²¢¸³³õÖµ */
int a = 5;
char c = 'a'; // 'a'µÄASCÂëµÄֵΪ97
float f = 5.3;
double m = 12.65;
double result;
/* ͬÀàÐÍÊý¾Ý¼ä½øÐÐÔËËã²¢Êä³ö½á¹û */
printf("a + c = %d\n", a + c); // 97+5=102
printf("a + c = %c\n", a + c); // 102¶ÔÓ¦µÄASCIIÂë×Ö·ûΪ'f'
printf("f + m = %f\n", f + m); // 5.3+12.65=17.95
/* ²»Í¬ÀàÐÍÊý¾Ý¼ä½øÐÐÔËËã²¢Êä³ö½á¹û */
printf("a + m = %f\n", a + m); //5+12.65=17.65
printf("c + f = %f\n", c + f); //97+5.3=102.3
/* ½«ÉÏÊöËĸö±äÁ¿½øÐлìºÏÔËË㣬²¢Êä³ö½á¹û */
result = a + c * (f + m);
printf("double = %f\n", result); //5+97*(5.3+12.65)=1746.15
return 0;
}
Ïà¹ØÎĵµ£º
ÏñPHPºÍperlÒ»Ñù£¬MySQLÒ²ÌṩµÄCÓïÑÔʹÓõÄAPI. C´úÂëµÄAPIÊÇËæMySQLÒ»Æð·¢²¼µÄ¡£ Ëü°üº¬ÔÚmysqlclient¿âÖУ¬ ¿ÉÒÔʹC³ÌÐòÀ´·ÃÎÊÊý¾Ý¿â¡£
MySQLÔ´Âë°üÖеÄÐí¶à¿Í»§¶Ë¶¼ÊÇÓÃCдµÄ¡£ Èç¹ûÄãÕýÔÚÕÒʹÓÃÕâЩC APIµÄÀý×Ó£¬ ¿ÉÒÔ¿´¿´¿Í»§¶ËµÄд·¨¡£Äã¿ÉÒÔÔÚMySQLÔ´Âë°üµÄclientsĿ¼ÕÒµ½ÕâЩÀý×Ó¡£
& ......
b/s ÊÇ brower/server ¾ÍÊÇÓÃä¯ÀÀÆ÷(Èçie)ΪӦÓóÌÐò¿Í»§¶Ë²Ù×÷·þÎñÆ÷¡£ÕâÑùÓÃä¯ÀÀÆ÷À´²Ù×÷¼òµ¥Ò×Ó㬵«ÊǶÔÊäÈëûÓкܺõÄÑéÖ¤¡£Â߼ʵÏÖ²»¶à¡£±¾µØÖ»ÊÇÓÃÓÚ»ñÈ¡Êý¾ÝÈ»ºó´ó²¿·ÖÑéÖ¤ÐèÒªÌá½»·þÎñÆ÷À´Íê³É¡£
c/s ÊÇclient/server ¿Í»§¶ËÈí¼þÔòÊÇÒ»¸öÓµÓкܶàÂß¼ÑéÖ¤µÄÈí¼þ£¬±¾µØÑéÖ¤³É¹¦ºó²ÅÌá½»·þÎñÆ÷¡£
ÎÒÕÒµ½µÄ¸ ......
ͻ 񻣼
¡¡±¾ÎÄÕë¶ÔÄ¿Ç°C/SģʽϱàдµÄÓ¦ÓóÌÐò¿Éά»¤ÐÔ²îµÄÌص㣬Ìá³öÁËÒ»Ì××Ô¶¯ÔÚÏßÉý¼¶µÄ½â¾ö·½°¸£¬·ÖÎöÁËÔÚÏßÉý¼¶µÄÀ§ÄѼ°ÊµÏÖÔÀí£¬²¢¸ø³öÁËʵÏÖÉý¼¶µÄ²¿·Ö´úÂ룬¾ßÓÐʵ¼Ê²Î¿¼¼ÛÖµºÍÏÖʵÒâÒå¡£±¾ÎijÌÐò´úÂë¾ùÔÚ.Net Framework 1.1 ºÍWindows2000ϲâÊÔͨ¹ý¡£
¡¡¹Ø¼ü´Ê£ºC#£»ÔÚÏßÉý¼¶£»×Ô¶¯Éý¼¶£ ......
Ìá³öÎÊÌ⣺
»Øµ÷º¯ÊýÊÇ»ùÓÚC±à³ÌµÄWindows SDKµÄ¼¼Êõ£¬²»ÊÇÕë¶ÔC++µÄ£¬³ÌÐòÔ±¿ÉÒÔ½«Ò»¸öCº¯ÊýÖ±½Ó×÷Ϊ»Øµ÷º¯Êý£¬µ«ÊÇÈç¹ûÊÔͼֱ½ÓʹÓÃC++µÄ³ÉÔ±º¯Êý×÷Ϊ»Øµ÷º¯Êý½«·¢Éú´íÎó£¬ÉõÖÁ±àÒë¾Í²»ÄÜͨ¹ý¡£
·ÖÎöÔÒò£º
ÆÕͨµÄC++³ÉÔ±º¯Êý¶¼Òþº¬ÁËÒ»¸ö´«µÝº¯Êý×÷Ϊ²ÎÊý£¬Ò༴“this”Ö¸Õ룬C++ͨ¹ý´«µÝÒ»¸öÖ¸Ïò×ÔÉíµÄÖ¸ ......
C/C++ÖеÄSplitº¯ÊýÊÇstrtok()Æ亯ÊýÔÐÍÈçÏÂ:
char * strtok (char * str, const char * delimiters);
º¯Êý˵Ã÷
strtok()ÓÃÀ´½«×Ö·û´®·Ö¸î³ÉÒ»¸ö¸öƬ¶Î¡£²ÎÊýstrÖ¸ÏòÓû·Ö¸îµÄ×Ö·û´®£¬²ÎÊýdelimitersÔòΪ·Ö¸î×Ö·û´®£¬µ±strtok()ÔÚ²ÎÊý
strµÄ×Ö·û´®Öз¢ÏÖµ½²ÎÊýdelimitersµÄ·Ö¸î×Ö·ûʱÔò»á½«¸Ã×Ö·û¸ÄΪ'\0'×Ö·û ......