¶Á¡¶c³ÌÐòÉè¼ÆÓïÑÔ¡·Ò»Ð©¸ÐÊÜ
×î½üÔÚ¿´¡¶c³ÌÐòÉè¼ÆÓïÑÔ¡·£¬¾ÍÊÇÄDZ¾±»ÓþΪCÓïÑÔÊ¥¾µÄÊé¼®¡£¼¸Ìì¿´ÁËÒ»Õ£¬¸Ð´¥ºÜ´ó£¬¿ªÆª¾ÍÉæ¼°µ½ºÜ¶àʵÓóÌÐò£¬²»ÏñÌ·ºÆÇ¿ÄÇÑùÈÃÈËÉîÏÝÓ﷨ϸ½ÚÖ®ÖУ¬¶øÇÒѧÍêÌ·µÄÊé¸Ð¾õʲô¶¼²»ÄÜ×ö¡£ºÜ¶àÎÊÌâÌ·¶¼»Ø±ÜÁË¡£Ëùνרҵ¿´¿´c³ÌÐòÉè¼ÆÓïÑԵĴúÂëµÄ·ç¸ñ¾ÍÄܸÐÊܵ½£¬Ò»ÖÖ¾«Ðĵñ×ÁµÄÒÕÊõÆ·¡£µÚÒ»ÕÂÓÐÒ»¸ö¼òµ¥µÄÎÊÌ⣬¾ÍÊÇ°Ñ×Ö·û´®Óжà¸ö¿Õ¸ñµÄÓÃÒ»¸ö¿Õ¸ñ´úÌ棬×Ô¼ºÐ´ÁËÒ»ÖÖ£¬ºóÀ´¿´Á˴𰸣¬¸Ð¾õ×Ô¼ºÆäʵ°Ñ¼òµ¥µÄÎÊÌ⸴ÔÓ»¯ÁË£¬Õâ»òÐí¾ÍÊÇ´óÅ£ÓëÎÒÕâÑù²ËÄñµÄ²î±ð¡£ÏÂÃæÊÇÎÒ×Ô¼ºµÄ³ÌÐò.#include<stdio.h>
int main(void)
{
int c;
int count;
while((c=getchar())!=EOF)
{
if(c==' ') count++;
else
{
putchar(c);
count==0;
}
if(count==1) putchar(' ');
}
}
Ïà¹ØÎĵµ£º
.hÖÐÒ»°ã·ÅµÄÊÇͬÃû.cÎļþÖж¨ÒåµÄ±äÁ¿¡¢Êý×é¡¢º¯ÊýµÄÉùÃ÷£¬ÐèÒªÈÃ.cÍⲿʹÓõÄÉùÃ÷¡£
1)hÎļþ×÷ÓÃ
1 ·½±ã¿ª·¢:°üº¬Ò»Ð©ÎļþÐèÒªµÄ¹²Í¬µÄ³£Á¿,½á¹¹,ÀàÐͶ¨Òå,º¯Êý,±äÁ¿ÉêÃ÷£»
2 Ìṩ½Ó¿Ú:¶ÔÒ»¸öÈí¼þ°üÀ´Ëµ¿ÉÒÔÌṩһ¸ö¸øÍâ½çµÄ½Ó¿Ú(ÀýÈç: stdio.h)¡£
2)hÎļþÀïÓ¦¸ÃÓÐʲô
³£Á¿,½á¹¹,ÀàÐ ......
SelectÔÚSocket±à³ÌÖл¹ÊDZȽÏÖØÒªµÄ£¬¿ÉÊǶÔÓÚ³õѧSocketµÄÈËÀ´Ëµ¶¼²»Ì«°®ÓÃSelectд³ÌÐò£¬ËûÃÇÖ»ÊÇÏ°¹ßдÖîÈç connect¡¢accept¡¢recv»òrecvfromÕâÑùµÄ×èÈû³ÌÐò£¨Ëùν×èÈû·½Ê½block£¬¹ËÃû˼Ò壬¾ÍÊǽø³Ì»òÊÇÏß³ÌÖ´Ðе½ÕâЩº¯Êýʱ±ØÐëµÈ
´ýij¸öʼþµÄ·¢Éú£¬Èç¹ûʼþûÓз¢Éú£¬½ø³Ì»òÏ߳̾ͱ»×èÈû£¬º¯Êý²»ÄÜÁ¢¼´·µ» ......
±êÇ©£º
it
·ÖÀࣺC/C++
ÎҵĻØÒäºÍÓÐȤµÄ¹ÊÊ --- C/C++ʥսƪ
Àîά
------------------------------------------------------------------------------------------
ÉùÃ÷
ÒÔϵÄÕâƪÎÄÕÂÄÚÈÝÊÇÎÒ¸öÈ˵ĻØÒäÒÔ¼°¿´·¨£¬Ã»ÓÐÈκÎÌرðµÄÆ«¼û£¬Ðí¶àµÄÊÂÇéÊǸù¾ÝÎҵļÇÒäÒÔ¼°´ÓÐí¶àÈ˵ÄËß˵ÖеÃÖªµÄ£¬Ò²ÐíÄÚÈݲ»ÊÇ°Ù·Ö ......
¹Ø¼üµÄʱ¿Ì - MFC Or Not
ÔÚSymantec C/C++ºÍWatcom C/C++Öð½¥µØÕ¾ÎÈÁ˽Ų½Ö®ºó£¬ËÄ´ó±àÒëÆ÷¾öÕ½µÄʱ¿ÌÒ²Ö𽥱ƽüÁË¡£ÔÚ1994ÄêδµÄ¾öս֮ǰ£¬SymantecºÍWatcomͬʱÃæ¶ÔÁËÒ»¸ö·Ç³£ÑÏÀ÷µÄ¿¼Ñ飬ÄǾÍÊÇC/C++ FrameworkµÄÑ¡Ôñ¡£ËäÈ»SymantecºÍWatcom¶¼ÒÔ¸÷×ÔµÄÌØÉ«Õ¼µÃÁËÊг¡£¬²»¹ýÔÚµ±Ê±¶ÔÓÚÒ»¸öC/C++¿ª·¢¹¤¾ßÀ´Ëµ£¬×îÖØÒªµÄÒ ......