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

C/C++ʱ¼äº¯ÊýʹÓ÷½·¨£¨×ª£©

C++¶Ôʱ¼äµÄ²Ù×÷Ò²ÓÐÐí¶àÖµµÃ´ó¼Ò×¢ÒâµÄµØ·½¡£×î½ü£¬ÔÚ¼¼ÊõȺÖÐÓкܶàÍøÓÑÒ²¶à´ÎÎʵ½¹ýC++ÓïÑÔÖжÔʱ¼äµÄ²Ù×÷¡¢»ñÈ¡ºÍÏÔʾµÈµÈµÄÎÊÌâ¡£ÏÂÃ棬ÔÚÕâƪÎÄÕÂÖУ¬±ÊÕß½«Ö÷Òª½éÉÜÔÚC/C++ÖÐʱ¼äºÍÈÕÆÚµÄʹÓ÷½·¨.
         ͨ¹ýѧϰÐí¶àC/C++¿â£¬Äã¿ÉÒÔÓкܶà²Ù×÷¡¢Ê¹ÓÃʱ¼äµÄ·½·¨¡£µ«ÔÚÕâ֮ǰÄãÐèÒªÁ˽âһЩ“ʱ¼ä”ºÍ“ÈÕÆÚ”µÄ¸ÅÄÖ÷ÒªÓÐÒÔϼ¸¸ö£º
         Coordinated Universal Time£¨UTC£©£ºÐ­µ÷ÊÀ½çʱ£¬ÓÖ³ÆΪÊÀ½ç±ê׼ʱ¼ä£¬Ò²¾ÍÊÇ´ó¼ÒËùÊìÖªµÄ¸ñÁÖÍþÖαê׼ʱ¼ä£¨Greenwich Mean Time£¬GMT£©¡£±ÈÈ磬ÖйúÄڵصÄʱ¼äÓëUTCµÄʱ²îΪ+8£¬Ò²¾ÍÊÇUTC+8¡£ÃÀ¹úÊÇUTC-5¡£
         Calendar Time£ºÈÕÀúʱ¼ä£¬ÊÇÓÓ´ÓÒ»¸ö±ê׼ʱ¼äµãµ½´ËʱµÄʱ¼ä¾­¹ýµÄÃëÊý”À´±íʾµÄʱ¼ä¡£Õâ¸ö±ê׼ʱ¼äµã¶Ô²»Í¬µÄ±àÒëÆ÷À´Ëµ»áÓÐËù²»Í¬£¬µ«¶ÔÒ»¸ö±àÒëϵͳÀ´Ëµ£¬Õâ¸ö±ê׼ʱ¼äµãÊDz»±äµÄ£¬¸Ã±àÒëϵͳÖеÄʱ¼ä¶ÔÓ¦µÄÈÕÀúʱ¼ä¶¼Í¨¹ý¸Ã±ê׼ʱ¼äµãÀ´ºâÁ¿£¬ËùÒÔ¿ÉÒÔ˵ÈÕÀúʱ¼äÊÇ“Ïà¶Ôʱ¼ä”£¬µ«ÊÇÎÞÂÛÄãÔÚÄÄÒ»¸öʱÇø£¬ÔÚͬһʱ¿Ì¶Ôͬһ¸ö±ê׼ʱ¼äµãÀ´Ëµ£¬ÈÕÀúʱ¼ä¶¼ÊÇÒ»ÑùµÄ¡£
         epoch£ºÊ±¼äµã¡£Ê±¼äµãÔÚ±ê×¼C/C++ÖÐÊÇÒ»¸öÕûÊý£¬ËüÓôËʱµÄʱ¼äºÍ±ê׼ʱ¼äµãÏà²îµÄÃëÊý£¨¼´ÈÕÀúʱ¼ä£©À´±íʾ¡£
         clock tick£ºÊ±ÖÓ¼Æʱµ¥Ôª£¨¶ø²»°ÑËü½Ð×öʱÖӵδð´ÎÊý£©£¬Ò»¸öʱÖÓ¼Æʱµ¥ÔªµÄʱ¼ä³¤¶ÌÊÇÓÉCPU¿ØÖƵġ£Ò»¸öclock tick²»ÊÇCPUµÄÒ»¸öʱÖÓÖÜÆÚ£¬¶øÊÇC/C++µÄÒ»¸ö»ù±¾¼Æʱµ¥Î»¡£
        ÎÒÃÇ¿ÉÒÔʹÓÃANSI±ê×¼¿âÖеÄtime.hÍ·Îļþ¡£Õâ¸öÍ·ÎļþÖж¨ÒåµÄʱ¼äºÍÈÕÆÚËùʹÓõķ½·¨£¬ÎÞÂÛÊÇÔڽṹ¶¨Ò壬»¹ÊÇÃüÃû£¬¶¼¾ßÓÐÃ÷ÏÔµÄCÓïÑÔ·ç¸ñ¡£ÏÂÃ棬ÎÒ½«ËµÃ÷ÔÚC/C++ÖÐÔõÑùʹÓÃÈÕÆÚµÄʱ¼ä¹¦ÄÜ¡£
2£® ¼Æʱ
         C/C++ÖеļÆʱº¯ÊýÊÇclock()£¬¶øÓëÆäÏà¹ØµÄÊý¾ÝÀàÐÍÊÇclock_t¡£ÔÚMSDNÖУ¬²éµÃ¶Ôclockº¯Êý¶¨ÒåÈçÏ£º
clock_t clock( void );
         Õâ¸öº¯Êý·µ»Ø´Ó“¿ªÆôÕâ¸ö³ÌÐò½ø³Ì”µ½“³ÌÐòÖе÷ÓÃclock()º¯Êý”ʱ֮¼äµÄCPUʱÖÓ¼Æʱµ¥Ôª£¨clock tick£©Êý£¬ÔÚM


Ïà¹ØÎĵµ£º

LinuxÏÂÓÃCÓïÑÔAPIÁ¬½ÓMySQLÊý¾Ý¿â

 ÏñPHPºÍperlÒ»Ñù£¬MySQLÒ²ÌṩµÄCÓïÑÔʹÓõÄAPI. C´úÂëµÄAPIÊÇËæMySQLÒ»Æð·¢²¼µÄ¡£ Ëü°üº¬ÔÚmysqlclient¿âÖУ¬ ¿ÉÒÔʹC³ÌÐòÀ´·ÃÎÊÊý¾Ý¿â¡£
    MySQLÔ´Âë°üÖеÄÐí¶à¿Í»§¶Ë¶¼ÊÇÓÃCдµÄ¡£ Èç¹ûÄãÕýÔÚÕÒʹÓÃÕâЩC APIµÄÀý×Ó£¬ ¿ÉÒÔ¿´¿´¿Í»§¶ËµÄд·¨¡£Äã¿ÉÒÔÔÚMySQLÔ´Âë°üµÄclientsĿ¼ÕÒµ½ÕâЩÀý×Ó¡£
& ......

ÓÃC/C£«£«Ð´CGI³ÌÐò

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

ÍƼö¼¸¸öÍøÉϵÄ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 ......

ÓÉCÊý×éarray[

        ×òÌìÒ»¸öͬѧºÍÎÒ̸ÆðËûÔÚ²âÊÔC³ÌÐòʱʱ·¢ÏÖʹÓÃ-1ΪϱêÀ´·ÃÎÊÊý×飬gcc²¢Ã»Óб¨´í£¬¶øÇÒÄܹ»ÔËÐгɹ¦£¬Õâ¸öÒÔÇ°ÎÒ»¹Ã»ÊÔ¹ý£¬´¦ÓÚºÃÆ棬½ñÌìÏÂÎç³éÁ˵ãʱ¼ä¿´ÁËһϡ£
     ÏÂÃæÊÇÎÒʹÓõIJâÊÔ´úÂ룬ÔËÐл·¾³ÊÇDEV-C++4.9.9.2£¬±àÒëÆ÷ʹÓõÄÊÇgcc¡£
&nb ......

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

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