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

CÖÐÈçºÎÅжÏdoubleÐÍÊý×éΪ¿Õ - C/C++ / CÓïÑÔ

[align=center][/align]CÓïÑÔÖÐÈçºÎÅжÏÒ»¸ödoubleÐ͵ÄÊý×飨Èçdouble S[20]£»£©ÊÇÒ»¸ö¿ÕÊý×飬¼´Êý×éÖÐûÓзÅÈκÎÖµ¡£
û°ì·¨¡£

"ÈκÎÖµ" µÄ¶¨Òå?

¾ÍÊÇÊý×éÊǿյģ¬Ã»ÓÐΪËü¸³Öµ


¿ÉÒÔ¿¼ÂÇÓÃÒ»¸ö±ê¼Ç£¬³õʼflag=0£¬¸³Öµºóflag=1£¬ÓÃflagÅжÏ

ÒýÓÃ

¾ÍÊÇÊý×éÊǿյģ¬Ã»ÓÐΪËü¸³Öµ

ÄãûÓÐΪËü¸³Öµ²»´ú±íËüûÓÐÖµ¡­¡­

ËùÒÔÄãÕâ¸öÇ°Ìá¾ÍÊDz»´æÔڵġ­¡­

»áΪËü¸³Öµ£¬¸³ÍêÖµºóÅжÏËüÊÇ·ñΪ¿Õ

Êý×éûÓÐÓÐûÓÐÖµµÄ¸ÅÄî
Ö»ÓÐÓÐЧֵºÍÎÞЧֵµÃ¸ÅÄî

ÒýÓÃ

»áΪËü¸³Öµ£¬¸³ÍêÖµºóÅжÏËüÊÇ·ñΪ¿Õ

Õâ¸öËùν¡°Îª¿Õ¡±µÄ״̬£¬ÓïÑÔûÓж¨Ò壬ÄãҲûÓиø³ö×Ô¼ºµÄ¶¨Òå¡£

ÄÇÄ㾿¾¹ÊÇÒªÅжÏʲôÄØ£¬Äã×Ô¼ºÖªµÀô£¿

ÒýÓÃ
»áΪËü¸³Öµ£¬¸³ÍêÖµºóÅжÏËüÊÇ·ñΪ¿Õ

¸³ÖµÊÇͨ¹ýÑ­»·¿ØÖÆÀ´¸³Öµ°É¡£
Ñ­»·¿ØÖÆÐèÒªÒ»¸öϱ꣬Èç
int i = 0;
³õʼ»¯Îª0£¬
ͨ¹ýÑ­»·¸³Öµ:
for(i = 0; i < nLen; i++) {
  ...
}
ÕâÑùÒ»µ©ÓÐÒ»²¿·Ö½øÐÐÁ˸´ÖÆ£¬i¾Í¿Ï¶¨´óÓÚ0ÁË¡£
ÓÃÕâ¸ö×÷Ϊ±êÖ¾À´ÅжÏÊý×éÊÇ·ñΪ¿Õ.
²»ÖªµÀÂ¥Ö÷ÊDz»ÊÇÕâ¸öÒâ˼¡£

ÊÇÕâÑùµÄ£¬Òª´Ó´«¸ÐÆ÷½ÓÊÕÊý¾Ý·ÅÈëÒ»¸öÊý×éÖУ¬µ«ÊÇͨÐÅͻȻÖжÏÁË£¬Òò´ËÄǶÎʱ¼äÊý×éÖÐÊÇûÓÐÊý¾ÝµÄ¡£ÏÖÔÚÏëͨ¹ýÊý×éÊÇ·ñΪ¿Õ·´¹ýÀ´ÅжÏͨÐÅÊÇ·ñÖжÏ


ÒýÓÃ
ÒýÓà 6 Â¥ yueliangshumoon µÄ»Ø¸´:
»áΪËü¸³Öµ£¬¸³ÍêÖµºóÅжÏËüÊÇ·ñΪ¿Õ

¸³ÖµÊÇͨ¹ýÑ­»·¿ØÖÆÀ´¸³Öµ°É¡£


Ïà¹ØÎÊ´ð£º

linux»·¾³ÏÂgethostbynameº¯ÊýÎÊÌâ - C/C++ / CÓïÑÔ

дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
   
  struct hostent *hp; 
char AlarmDevIP[20];  
  int x2;

hp = gethostbyname("www.google.com");
if (hp)
{ ......

c¾²Ì¬±àÒëÁíÒ»¸öÎļþ¼ÐµÄ¿âº¯Êý - C/C++ / CÓïÑÔ

ÔÚ¸ùĿ¼/libÖдæ·ÅÒ»¸ölog.c£¬log.h£¬²¢ÓÃÏÂÃæµÄÓï¾ä£º
gcc -c log.c
ar crv liblog.a log.o
±àÒë³öÒ»¸öliblog.a¾²Ì¬¿â£¬È»ºóÔÚÎļþ¼Ð£º/testfileÖд´½¨Ò»¸ötest.cºÍtestc.c£¬test.cÖÐÒýÓÃÁËtestc.cÖж¨ÒåµÄ·½·¨ ......

visual c++2008²»ÄܱàÒëC³ÌÐòÂð - C/C++ / CÓïÑÔ

visual c++2008Ëٳɰ棬²»ÄܱàÒëC³ÌÐòÂð£¿Èç¹ûÄÜÊÇÔõô¿ªÊ¼µÄ°¡£¿ÓÃËü´øµÄÃüÁîÌáʾµ¥Ôª³ýÍâ ¡£
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆ̨£©

¾ø¶Ô¿ÉÒÔ¡£½¨Á¢win32¿ØÖÆ̨³ÌÐò¾Í¿ÉÒÔ

ÒýÓÃ
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆ̨£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ