ʹÓÃC/C++ÔËÐÐʱ¿âº¯Êý²Ù×÷Ïß³Ì
Visual Studio°üº¬ÁË4¸ö±¾»úC/C++ÔËÐÐʱ¿âºÍ2¸öÓÃÀ´¹ÜÀíMS.NETµÄC/C++ÔËÐÐʱ¿â¡£ËùÓÐÕâЩ¿â¶¼Ö§³Ö¶àÏ̱߳à³Ì»·¾³£ºÄ¿Ç°ÒѾûÓÐרÃÅΪµ¥Ï߳̿ª·¢Éè¼ÆµÄC/C++ÔËÐÐʱ¿âÁË¡£±í6-1¶ÔÕâЩ¿â½øÐÐÁËÃèÊö£º
Libray Name
Description
LibCMt.lib
Statically linked release version of the library.
LibCMtD.lib
Statically linked debug version of the library.
MSVCRt.lib
Import library for dynamically linking the release version of the MSVCR80.dll library. (This is the default library when you create a new project.)
MSVCRtD.lib
Import library for dynamically linking the debug version of the MSVCR80D.dll library.
MSVCMRt.lib
Import library used for mixed managed/native code.
MSVCURt.lib
Import library compiled as 100-percent pure MSIL code.
µ±Ð½¨Ò»¸öÏîĿʱ£¬ÄãÓ¦¸ÃÖªµÀµ±Ç°ÏîÄ¿Á´½ÓµÄÊÇÄÄÒ»¸ö¿â¡£ÔÚVisual Studio»·¾³Ï£¬¿ÉÒÔͨ¹ý“ÏîÄ¿ÊôÐÔ”——“ÅäÖÃÊôÐÔ”——“C/C++”——“´úÂëÉú³É”——“ÔËÐÐʱ¿â”ÉèÖá£
±ê×¼CÔËÐÐʱ¿âÊÇÔÚ1970Äê×óÓÒ·¢²¼µÄ£¬ÄÇʱ»¹Ã»ÓÐÏß³ÌÕâ¸ö¸ÅÄÒò´ËCÔËÐÐʱ¿âµÄ´´ÔìÕßÃÇҲûÓÐÒâʶµ½ÔÚ¶àÏ̻߳·¾³ÏÂʹÓÃCÔËÐÐʱ¿â´øÀ´µÄÎÊÌâ¡£ÎÒÃÇÀ´¾Ù¸öÀý×Ó£¬±ê×¼CÔËÐÐʱ¿âÖеÄÈ«¾Ö±äÁ¿errnoÓÃÀ´±íʾ×îºóÒ»´Îº¯Êýµ÷Óõijö´íÂ룬ÏÂÃæµÄ´úÂë¶ÎÔÚ¶àÏ̻߳·¾³Ï¿ÉÄÜ»áÒý·¢Ò»Ð©ÎÊÌ⣺
BOOL fFailure = (system("NOTEPAD.exe README.text") == -1);
if(fFailure){
switch(errno){
case E2BIG:
...
break;
case ENOENT:
...
break;
case ENOEXEC:
...
break;
case ENOMEM:
...
break;
}
}
¼ÙÉ赱ǰÏß³ÌÔÚsystemµ÷Óúó¡¢ifÓï¾ä֮ǰ±»Öжϣ¬²¢ÇÒ½ø³ÌÄÚµÄÁíÍâÒ»¸öÏ̱߳»µ÷¶ÈÇÒ¸ü¸ÄÁËerrnoµÄÖµ£¬È»ºóϵͳ¼ÌÐø·µ»Øµ÷¶ÈµÚÒ»¸öỊ̈߳¬²¢ÅжÏerrno£¬È»¶ø´ËʱµÄerrnoÒѱ»ÁíÍâµÄÏ̸߳ü¸Ä¹ý£¬ÎÞ·¨ÔÙ׼ȷµÄ·´Ó¦µ±systemÖ´ÐеÄ״̬ÁË¡£ÎªÁ˽â¾öÕâ¸öÎÊÌ⣬ÿ¸öÏß³ÌÓ¦¸ÃÓÐ×Ô¼ºµÄerrno±äÁ¿£¬´ËÍâÓ¦µ±±£Ö¤Ã¿¸öÏß³ÌÖ»¸ü¸Ä×Ô¼ºµÄerrno¶ø²»»áÓ°Ïìµ½ÆäËüÏ̡߳£
ÕâÖ»ÊDZê×¼C/C++ÔËÐÐʱ¿âÎÞ·¨ÊÊÓ¦¶àÏ̻߳·¾³µÄÒ»¸öÀý×Ó£¬ÊÂʵÉÏ£¬ÔÚ¶àÏ̻߳·¾³Ï»á³öÎÊÌâµÄC/C++ÔËÐÐʱ¿â±äÁ¿ºÍº¯Êý»¹°üÀ¨£¨µ«²»ÏÞÓÚ£©_doserrno¡¢strtok¡¢_wcstok¡¢strerror¡¢
Ïà¹ØÎĵµ£º
VB
If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
MSComm1.CommPort = i1
MSComm1.PortOpen = True
MSComm1.InputMode = comInputModeBinary
MSComm1.InBufferCount = 0
& ......
µ±½ñÓÐÐí¶àÃâ·ÑµÄ RDBMS£¨Relational Database Management
System£¬¹ØϵÊý¾Ý¿â¹ÜÀíϵͳ£©£¬ÆäÖÐһЩÊÇ¿ª·ÅÔ´ÂëÈí¼þ£¬ÁíһЩÊÇÉÌÒµ³§ÉÌÌṩµÄÃâ·Ñ²úÆ·¡£Èç¹ûÄúÕýÔÚʹÓà C/C++¡¢Java™¡¢.NET
»ò PHP
¿ª·¢Ó¦ÓóÌÐò£¬ÏëÑ°ÕÒÒ»ÖÖ¿É¿¿µÄÊý¾Ý·þÎñÆ÷£¬Ï£ÍûËüÖ§³ÖÏȽøµÄ¼¼Êõ¡¢¾ßÓ⻶ÏÀ©´óµÄ¿ª·¢ÈËÔ±ÉçÇø²¢ÒѾ²¿ÊðÔÚÐí¶à¹Ø¼ ......
ÕâƪÎÄÕÂÊÇʹÓÃSQLite C/C++½Ó¿ÚµÄÒ»¸ö¸ÅÒª½éÉܺÍÈëÃÅÖ¸ÄÏ¡£
ÓÉÓÚÔçÆÚµÄSQLiteÖ»Ö§³Ö5¸öC/C++½Ó¿Ú£¬Òò¶ø·Ç³£ÈÝÒ×ѧϰºÍʹÓ㬵«ÊÇËæ×ÅSQLite¹¦ÄܵÄÔöÇ¿£¬ÐµÄC/C++½Ó¿Ú²»¶ÏµÄÔö¼Ó½øÀ´£¬µ½ÏÖÔÚÓг¬¹ý150¸ö²»Í¬µÄAPI½Ó¿Ú¡£ÕâÍùÍùʹ³õѧÕßÍû¶øÈ´²½¡£ÐÒÔ˵ÄÊÇ£¬´ó¶àÊýSQLiteÖеÄC/C++½Ó¿ÚÊÇרÓõģ¬Òò¶øºÜÉÙ±»Ê¹Óõ½¡£¾¡¹ÜÓÐÕâ ......
ÎÒÃÇÒѾÁ˽âÈçºÎ¶¨ÒåÏß³ÌÈë¿Úµãº¯Êý¡¢µ÷ÓÃϵͳAPI´´½¨Ö´ÐÐÖ¸¶¨º¯ÊýµÄÏ̡߳£±¾½Ú½«½ÒʾÕâÒ»ÇÐÔÚϵͳÄÚ²¿ÊÇÈçºÎÍê³ÉµÄ¡£
ͼ6-1ÃèÊöÁËÏ̴߳´½¨²¢Íê³É³õʼ»¯ºóµÄ״̬¡£µ÷ÓÃCreateThread»áʹϵͳ²úÉúÒ»¸öÏß³ÌÄں˶ÔÏó£¬ÆäÒýÓüÆÊý£¨Usage count£©±»³õʼ»¯Îª2£¨´´½¨Ï̵߳Ľø³ÌºÍÏ̱߳¾Éí¶¼ÒýÓÃÁ˸ÃÄں˶ÔÏ󣩣¬ÆäËüÊôÐÔÒ²Íê³ÉÁË ......
Ò»¡¢Ê²Ã´ÊÇB/S½á¹¹ºÍC/S½á¹¹¡£
µÚÒ»¡¢Ê²Ã´ÊÇC/S½á¹¹¡£
C/S £¨Client/Server£©½á¹¹£¬¼´´ó¼ÒÊìÖªµÄ¿Í»§»úºÍ·þÎñÆ÷½á¹¹¡£ËüÊÇÈí¼þϵͳÌåϵ½á¹¹£¬Í¨¹ýËü¿ÉÒÔ³ä·ÖÀûÓÃÁ½¶ËÓ²¼þ»·¾³µÄÓÅÊÆ£¬½«ÈÎÎñºÏÀí·ÖÅäµ½Client¶ËºÍServer¶ËÀ´ÊµÏÖ£¬½µµÍÁËϵͳµÄͨѶ¿ªÏú¡£Ä¿ ......