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

c ÓïÑÔÖеÄstatic

1. static ±äÁ¿
¾²Ì¬±äÁ¿µÄÀàÐÍ ËµÃ÷·ûÊÇstatic¡£ ¾²Ì¬±äÁ¿µ±È»ÊÇÊôÓÚ¾²Ì¬´æ´¢·½Ê½£¬µ«ÊÇÊôÓÚ¾²Ì¬´æ´¢·½Ê½µÄÁ¿²»Ò»¶¨¾ÍÊǾ²Ì¬±äÁ¿¡£ ÀýÈçÍⲿ±äÁ¿ËäÊôÓÚ¾²Ì¬ ´æ´¢·½Ê½£¬µ«²»Ò»¶¨ÊǾ²Ì¬±äÁ¿£¬±ØÐëÓÉ static¼ÓÒÔ¶¨Òåºó²ÅÄܳÉΪ¾²Ì¬Íⲿ±äÁ¿£¬»ò³Æ¾²Ì¬È«¾Ö±äÁ¿¡£
2. ¾²Ì¬¾Ö²¿±äÁ¿
¾²Ì¬¾Ö²¿±äÁ¿ÊôÓÚ¾²Ì¬´æ´¢·½Ê½£¬Ëü¾ßÓÐÒÔÏÂÌص㣺
(1)¾²Ì¬¾Ö²¿±äÁ¿ÔÚº¯ÊýÄÚ¶¨Òå ËüµÄÉú´æÆÚΪÕû¸öÔ´³ÌÐò£¬µ«ÊÇÆä×÷ÓÃÓòÈÔÓë×Ô¶¯±äÁ¿Ïàͬ£¬Ö»ÄÜÔÚ¶¨Òå¸Ã±äÁ¿µÄº¯ÊýÄÚʹÓøñäÁ¿¡£Í˳ö¸Ãº¯Êýºó£¬ ¾¡¹Ü¸Ã±äÁ¿»¹¼ÌÐø´æÔÚ£¬µ«²»ÄÜʹÓÃËü¡£
(2)ÔÊÐí¶Ô¹¹ÔìÀྲ̬¾Ö²¿Á¿¸³³õÖµ ÀýÈçÊý×飬Èôδ¸³ÒÔ³õÖµ£¬ÔòÓÉϵͳ×Ô¶¯¸³ÒÔ0Öµ¡£
(3)¶Ô»ù±¾ÀàÐ͵ľ²Ì¬¾Ö²¿±äÁ¿ÈôÔÚ˵Ã÷ʱδ¸³ÒÔ³õÖµ£¬Ôòϵͳ×Ô¶¯¸³Óè0Öµ¡£¶ø¶Ô×Ô¶¯±äÁ¿²»¸³³õÖµ£¬ÔòÆäÖµÊDz»¶¨µÄ¡£ ¸ù¾Ý¾²Ì¬¾Ö²¿±äÁ¿µÄÌص㣬 ¿ÉÒÔ ¿´³öËüÊÇÒ»ÖÖÉú´æÆÚΪÕû¸öÔ´³ÌÐòµÄÁ¿¡£ËäÈ»À뿪¶¨ÒåËüµÄº¯Êýºó²»ÄÜʹÓ㬵«ÈçÔٴε÷Óö¨ÒåËüµÄº¯Êýʱ£¬ËüÓֿɼÌÐøʹÓ㬠¶øÇÒ±£´æÁËÇ°´Î±»µ÷ÓúóÁôÏÂµÄ Öµ¡£ Òò´Ë£¬µ±¶à´Îµ÷ÓÃÒ»¸öº¯ÊýÇÒÒªÇóÔÚµ÷ÓÃÖ®¼ä±£ÁôijЩ±äÁ¿µÄֵʱ£¬¿É¿¼ÂDzÉÓþ²Ì¬¾Ö²¿±äÁ¿¡£ËäÈ»ÓÃÈ«¾Ö±äÁ¿Ò²¿ÉÒÔ´ïµ½ÉÏÊöÄ¿µÄ£¬µ«È«¾Ö±äÁ¿ÓÐʱ»áÔì³É ÒâÍâµÄ¸±×÷Óã¬Òò´ËÈÔÒÔ²ÉÓþֲ¿¾²Ì¬±äÁ¿ÎªÒË¡£
3.¾²Ì¬È«¾Ö±äÁ¿
È«¾Ö±äÁ¿(Íⲿ±äÁ¿)µÄ˵Ã÷֮ǰÔÙ¹ÚÒÔstatic ¾Í¹¹ ³ÉÁ˾²Ì¬µÄÈ«¾Ö±äÁ¿¡£È«¾Ö±äÁ¿±¾Éí¾ÍÊǾ²Ì¬´æ´¢·½Ê½£¬ ¾²Ì¬È«¾Ö±äÁ¿µ±È»Ò²ÊǾ²Ì¬´æ´¢·½Ê½¡£ ÕâÁ½ÕßÔÚ´æ´¢·½Ê½Éϲ¢ÎÞ²»Í¬¡£ÕâÁ½ÕßµÄÇø±ðËäÔÚÓڷǾ²Ì¬È«¾Ö ±äÁ¿µÄ×÷ÓÃÓòÊÇÕû¸öÔ´³ÌÐò£¬ µ±Ò»¸öÔ´³ÌÐòÓɶà¸öÔ´Îļþ×é³Éʱ£¬·Ç¾²Ì¬µÄÈ«¾Ö±äÁ¿ÔÚ¸÷¸öÔ´ÎļþÖж¼ÊÇÓÐЧµÄ¡£ ¶ø¾²Ì¬È«¾Ö±äÁ¿ÔòÏÞÖÆÁËÆä×÷ÓÃÓò£¬ ¼´Ö»ÔÚ ¶¨Òå¸Ã±äÁ¿µÄÔ´ÎļþÄÚÓÐЧ£¬ ÔÚͬһԴ³ÌÐòµÄÆäËüÔ´ÎļþÖв»ÄÜʹÓÃËü¡£ÓÉÓÚ¾²Ì¬È«¾Ö±äÁ¿µÄ×÷ÓÃÓò¾ÖÏÞÓÚÒ»¸öÔ´ÎļþÄÚ£¬Ö»ÄÜΪ¸ÃÔ´ÎļþÄڵĺ¯Êý¹«Ó㬠Òò´Ë ¿ÉÒÔ±ÜÃâÔÚÆäËüÔ´ÎļþÖÐÒýÆð´íÎó¡£´ÓÒÔÉÏ·ÖÎö¿ÉÒÔ¿´³ö£¬ °Ñ¾Ö²¿±äÁ¿¸Ä±äΪ¾²Ì¬±äÁ¿ºóÊǸıäÁËËüµÄ´æ´¢·½Ê½¼´¸Ä±äÁËËüµÄÉú´æÆÚ¡£°ÑÈ«¾Ö±äÁ¿¸Ä±äΪ¾²Ì¬±äÁ¿ ºóÊǸıäÁËËüµÄ×÷ÓÃÓò£¬ ÏÞÖÆÁËËüµÄʹÓ÷¶Î§¡£Òò´Ëstatic Õâ¸ö˵Ã÷·ûÔÚ²»Í¬µÄµØ·½ËùÆðµÄ×÷ÓÃÊDz»Í¬µÄ¡£
4. static º¯Êý…..
ÄÚ²¿º¯ÊýºÍÍⲿº¯Êý
µ±Ò»¸öÔ´³ÌÐòÓɶà¸öÔ´Îļþ×é³Éʱ£¬£ÃÓïÑÔ¸ù¾Ýº¯ÊýÄÜ·ñ±»ÆäËüÔ´ÎļþÖеĺ¯Êýµ÷Ó㬽«º¯Êý·ÖΪÄÚ²¿º¯ÊýºÍÍⲿº¯Êý¡£
1 ÄÚ²¿º¯Êý£¨Óֳƾ²Ì¬º¯Êý£©
Èç¹ûÔÚÒ»¸öÔ´ÎļþÖж¨ÒåµÄº¯Êý£¬Ö»Äܱ»±¾ÎļþÖеĺ¯Êýµ÷Ó㬶ø²


Ïà¹ØÎĵµ£º

ÓÃCÓïÑÔÀ©Õ¹PythonµÄ¹¦ÄÜ

µ±½ñÓÐÐí¶àÃâ·ÑµÄ RDBMS£¨Relational Database Management
System£¬¹ØϵÊý¾Ý¿â¹ÜÀíϵͳ£©£¬ÆäÖÐһЩÊÇ¿ª·ÅÔ´ÂëÈí¼þ£¬ÁíһЩÊÇÉÌÒµ³§ÉÌÌṩµÄÃâ·Ñ²úÆ·¡£Èç¹ûÄúÕýÔÚʹÓà C/C++¡¢Java™¡¢.NET
»ò PHP
¿ª·¢Ó¦ÓóÌÐò£¬ÏëÑ°ÕÒÒ»ÖÖ¿É¿¿µÄÊý¾Ý·þÎñÆ÷£¬Ï£ÍûËüÖ§³ÖÏȽøµÄ¼¼Êõ¡¢¾ßÓ⻶ÏÀ©´óµÄ¿ª·¢ÈËÔ±ÉçÇø²¢ÒѾ­²¿ÊðÔÚÐí¶à¹Ø¼ ......

CÖÐÈçºÎµ÷ÓÃC++º¯Êý

CÖÐÈçºÎµ÷ÓÃC++º¯Êý?
 
Ç°Õó×Ó±»Îʼ°Ò»¸öÔÚCÖÐÈçºÎµ÷ÓÃC++º¯ÊýµÄÎÊÌ⣬µ±Ê±¼òµ¥»Ø´ðÊǽ«º¯ÊýÓÃextern "C"ÉùÃ÷£¬µ±±»Îʼ°ÈçºÎ½«ÀàÄÚ³ÉÔ±º¯ÊýÉùÃ÷ʱ£¬Ò»Ê±ÓïÈû£¬ºóÀ´ÍøÉϲéÁËÏ£¬ÍøÉÏÓÐÒ»·­ÒëC++Ö®¸¸µÄÎÄÕ¿ÉÒÔ×÷Ϊ½â´ð£¬ËìÄÃÀ´Markһϡ£
 
½« C++ º¯ÊýÉùÃ÷Ϊ``extern "C"''£¨ÔÚÄãµÄ C++ ´úÂëÀï×öÕâ¸öÉùÃ÷£©£¬ ......

C HTTP URL ½âÂë

Õ⼸ÌìÔÚʹÓÃÓÃCд¸öÏîÄ¿×éµÄ×Ô¶¯»¯²âÊÔ¹¤¾ßÀàËÆCGI³ÌÐò£¬µÚÒ»¸öÓöµ½µÄÎÊÌâ¾ÍÊDZàÂëÁË¡£
0~9 a~z A¡«ZÕâЩ×Ö·ûÊDz»»á±»±àÂëµÄ£¬µ«ÊDZÈÈçһЩÌØÊâ×Ö·û»òÊÇÖÐÎÄ£¬post»ògetÊý¾Ýʱ£¬»á¶ÔÊý¾Ý×Ô¶¯½øÐбàÂ룬±ÈÈ纺×Ö'ÖÐ',Èç¹ûÒ³Ãæ²ÉÓõÄÊÇgb2312±àÂ룬'ÖÐ'×ֻᱻ±àÂëΪ'%D6%D0'£¬ºöÂÔ'%'±êʶ,Á½¸öÊ®Áù½øÖÆÊý£¬¼´0xD6,0xD0£¬Áù¸ ......

Ò»¸öÓÃCʵÏÖµÄURL½âÂëµÄ³ÌÐò

#include <stdio.h>
#include <string.h>
/*
* decode encd with URL, the result saved to decd.
* return point to be decoded string.
* auth: baisoo email:baisoo@msn.com
*/
char *decode( char *encd, char decd[] );
int main( int argc, char *argv[] )
{
    if( argc < ......

CÎļþ²Ù×÷Óëfstream¶ÁÈ¡Îı¾ÎļþµÄЧÂʱȽÏ

Õ⼸ÌìÓÉÓÚÒª¶ÁÈ¡½Ï´óµÄÎı¾Îļþ£¬ËùÒԾͱȽÏÁËÒ»ÏÂÁ½ÕßÖ®¼äµÄЧÂÊÎÊÌâ¡£ ËùÒª¶ÁÈ¡µÄÎı¾Îļþ½á¹¹ÎªÃ¿ÐÐÓÉ5¸öÊý×é³É£¬int int int float int£¬²âÊÔµÄÎļþÓÐ33WÐУ¬´óСΪ9M¡£ÏÖÔÚÒª½«Æä¶Áµ½Ò»¸öcube½á¹¹ÌåÀïÃæÈ¥£¬½á¹¹ÌåÓÐ5¸ö³ÉÔ±±äÁ¿ÓëÖ®¶ÔÓ¦¡£ Á½ÖÖ²Ù×÷µÄ´úÂëÈçÏ start = clock();
    ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ