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

c×Ö·û´® - C/C++ / CÓïÑÔ

C/C++ code:



#include "stdio.h"
int main(void)
{
char s1[] ="hello";
char s2[] = "wor";
strcpy(s1+strlen(s1),s2);
puts(s1);
return 0;
}




½á¹ûΪ hellowor

ÎÒÏëÎÊÏÂstrcpy µÚÒ»¸ö²ÎÊý s1+strlen(s1)ÊÇʲô¶«Î÷£¬ Ū²»Ã÷°×ÊÇÔõôʵÏÖµÄ
Õâ¸ö²»Ðаɣ¡
char s1[] ="hello";
 char s2[] = "wor";
Ê×ÏÈÄ㶨ÒåµÄ¶¼Êdz£Á¿Êý×飬²»ÄÜcopyµÄ£¡
ÔÙ¾ÍÊǼ´±ãÊÇÄÜcopy Äã s1µÄ³¤¶ÈÒ²²»¹»ÈÝÄÉ Á½¸öÖ®ºÍѽ£¡

destinationµÄµØÖ·¡£


strcpy(des,orign) ÊÇ´Óorigi¿½±´µ½des £¬ ¿½±´µÄ³¤¶ÈÊÇorginµÄÖ¸ÕëÖ¸ÏòµÄµØÖ·µ½´ÓÕâ¸öµØÖ·¿ªÊ¼ÕÒµ½µÄµÚÒ»¸ö\0¡£


s1ÕâÀï±ä³ÉÀïchar*£¬s1+strlen(s1)¾Í³ÉÁËs1µÄ×Ö·û´®Î²¡£




s1ÊÇ×Ö·û´®µÄÊ×µØÖ·...
strlen(s1)ÊÇs1µÄ³¤¶È.
ËùÒÔ¾ÍÊǽ«s2½ÓÔÚs1µÄºóÃæÁË.


ÕâÑù²»»áÕ»Òç³ö£¿¹Ö£¡

Êý×éÃûs1ÆäʵÊÇÒ»Ö¸Õ룬s1Ö¸Ïò¡°hello¡±µÄ"h"£¬¶østrlen(sl)ÊÇ·µ»Ø¡°hello¡±µÄ³¤¶È£¬
¼´strlen(s1)=5£¬¹Ês1+strlen(s1)ÊÇÖ¸Ïò¡°hello¡±ÖС°o¡±µÄÏÂһλÖá£
ËùÒÔ£ºstrcpy(s1+strlen(s1),s2);Ö»Êǽ«s2¸´ÖƵ½¡°o¡±µÄºóÃæ¡£Èç´Ë½á¹ûΪ"hellowor"¡£

LZ£¬¿ÉÒԵõ½Äã˵µÄ½á¹û£¿

s1+strlen(s1)ÊǵØÖ·°¡¡£s1±¾À´¾ÍÊÇs1Êý×éµÄ³õµØÖ·¡£ÔÙ¼ÓÉϳ¤¶È¾ÍÊÇs1µÄÄ©µØÖ·ÁË¡¢strcpyÊǸ´Öƺ¯Êý¡£²ÎÊýÊÇÖ¸Õë¡£¾ÍÊǼÌÐøÍùºóÃ渴ÖÆs2µÄÄÚÈÝ

CÓïÑÔÁé»î¶à±ä¡£¡£


Õâ¸öÎÊÌâÒÔÇ°ÎÒÎʹý¡£


Ïà¹ØÎÊ´ð£º

VFPÈçºÎµ÷ÓÃCº¯Êý - ÆäËûÊý¾Ý¿â¿ª·¢ / VFP

ÇëÎÊVFPÖÐÈçºÎµ÷ÓÃC/C++º¯Êý£¿

ÄãÒªµ÷ÓÃʲô¹¦Äܵĺ¯Êý£¿Òª¿´¿´VFPÖÐÓÐûÓжÔÓ¦µÄº¯Êý£¬Èç¹ûÓоÍÊ¡×ÅÔÙµ÷ÓÃÁË¡£Èç¹ûûÓУ¬¿ÉÒÔ½«C/C++º¯Êýд¸öDLL»òFLL£¬È»ºóÔÚVFPµ÷Óü´¿É¡£

Ê®¶¹Èý ÀÏʦ£¬Ôõô²ÅÄÜÐÞ¸Ä×Ô¼ºµÄ ......

C/SÏîÄ¿¼Ü¹¹Éè¼Æ----ÇóÖú - Java / Java SE

±¾ÈËÕýÔÚÓÃJava×öÒ»¸öC/S¼Ü¹¹µÄÏîÄ¿£¬ 
¿ÉÊÇÓÉÓÚÏîÄ¿±È½Ï´ó£¬Ç°ÆڶԼܹ¹µÄÉè¼ÆÓÈÆäÖØÒª£¬ÒòΪºóÆÚ¿ÉÄÜËæʱ»á¼Ó¸ö¹¦ÄÜ»òÕßÈ¥µôijЩ¹¦ÄÜ¡£ 
ËùÒÔÌصØÑ°ÇóÈçºÎÉè¼ÆC/SµÄ¼Ü¹¹Ê¹³ÌÐò¸ü¼ÓÃæÏò¶ÔÏó¸ü¼ÓÒ×ÓÚά ......

Ϊʲôxml²»ÄÜÏÔʾ°¢À­²®ÎÄ - C/C++ / C++ ÓïÑÔ

ΪʲôÎҵijÌÐòµ÷ÓÃXMLÅäÖÃÎļþÖеİ¢À­²®ÎÄÏÔʾ²»³öÀ´£¿ÆäËûµÄÓïÖÖ¶¼¿ÉÒÔ£¬ÈçÖÐÎÄ£¬Ó¢ÎÄ£¬µÂÎĶ¼¿É¡£
ÎÒ½«XMLµÄ±àÂë¸ÄΪutf-8ºÍunicodeµÄµ½µÃ½á¹û¶¼Ò»Ñù.
°¢À­²®ÎĵÄ×Ö¿âÄãÓÐô£¿

ÓÐ,ÎÒµÄEXEÊÇ·ÅÔÚpc»úÉÏÖ´Ðе ......

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

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

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

ÒýÓÃ
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆ̨£ ......

rubyºÍMinGWµÄÒ»´ÎÈÚºÏ - C/C++ / C++ ÓïÑÔ

Ï£Íû¸ø´ó¼ÒÌṩһЩеÄ˼·.
ÎÒÃÇÔÚʹÓÃC±à³Ìʱ»áÓöµ½Ò»¸öÎÊÌ⣬±ÈÈçÍ·ÎļþµÄÒ»¸öº¯Êý°üº¬ÔÚÒ»¸ölib ÖУ¬µ«ÊÇ
ÔÚʵ¼ÊÁ¬½ÓÖÐÎÒÃDz»ÖªµÀËüÔÚÄĸö¿âÖС£Ò²Ðí¿ÉÐеÄÒ»ÖÖ°ì·¨ÊÇÖ±½ÓÉÏÍø²éѯij¸ö
º¯ÊýµÄÒÀÀµÌõ¼þ£¬Õâ¶Ô ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ