תÌù C/C++³ÌÐòÔ±³£¼ûÃæÊÔÌâÉîÈëÆÊÎö
1.ÒýÑÔ ±¾ÎĵÄд×÷Ä¿µÄ²¢²»ÔÚÓÚÌṩC/C++³ÌÐòÔ±ÇóÖ°ÃæÊÔÖ¸µ¼£¬¶øÖ¼ÔÚ´Ó¼¼ÊõÉÏ·ÖÎöÃæÊÔÌâµÄÄÚº¡£ÎÄÖеĴó¶àÊýÃæÊÔÌâÀ´×Ô¸÷´óÂÛ̳£¬²¿·ÖÊÔÌâ½â´ðÒ²²Î¿¼ÁËÍøÓѵÄÒâ¼û-¡£
Ðí¶àÃæÊÔÌâ¿´ËƼòµ¥£¬È´ÐèÒªÉîºñµÄ»ù±¾¹¦²ÅÄܸø³öÍêÃÀµÄ½â´ð¡£ÆóÒµÒªÇóÃæÊÔÕßдһ¸ö×î¼òµ¥µÄstrcpyº¯Êý¶¼¿É¿´³öÃæÊÔÕßÔÚ¼¼ÊõÉϾ¿¾¹´ïµ½ÁËÔõÑùµÄ³Ì
¶È£¬ÎÒÃÇÄÜÕæÕýдºÃÒ»¸östrcpyº¯ÊýÂð£¿ÎÒÃǶ¼¾õµÃ×Ô¼ºÄÜ£¬¿ÉÊÇÎÒÃÇд³öµÄstrcpyºÜ¿ÉÄÜÖ»ÄÜÄõ½10·ÖÖеÄ2·Ö¡£¶ÁÕß¿É´Ó±¾ÎÄ¿´µ½strcpy
º¯Êý´Ó2·Öµ½10·Ö½â´ðµÄÀý×Ó£¬¿´¿´×Ô¼ºÊôÓÚʲôÑùµÄ²ã´Î¡£´ËÍ⣬»¹ÓÐһЩÃæÊÔÌ⿼²éÃæÊÔÕßÃô½ÝµÄ˼άÄÜÁ¦¡£
·ÖÎöÕâЩÃæÊÔÌ⣬±¾Éí°üº¬ºÜÇ¿µÄȤζÐÔ£»¶ø×÷ΪһÃûÑз¢ÈËÔ±£¬Í¨¹ý¶ÔÕâЩÃæÊÔÌâµÄÉîÈëÆÊÎöÔò¿É½øÒ»²½ÔöÇ¿×ÔÉíµÄÄÚ¹¦¡£
2.ÕÒ´íÌâ
ÊÔÌâ1£º
void test1()
{
char string[10];
char* str1 = "0123456789";
strcpy( string, str1 ); }
ÊÔÌâ2£º
void test2()
{
char string[10], str1[10];
int i;
for(i=0; i<10; i++)
{ str1 = 'a'£»
}
strcpy( string, str1 )£» }
ÊÔÌâ3£º
void test3(char* str1)
{
char string[10];
if( strlen( str1 ) <= 10 )
{
strcpy( string, str1 );
}
}
½â´ð£º
ÊÔÌâ1×Ö·û´®str1ÐèÒª11¸ö×Ö½Ú²ÅÄÜ´æ·ÅÏ£¨°üÀ¨Ä©Î²µÄ'\0'£©£¬¶østringÖ»ÓÐ10¸ö×ֽڵĿռ䣬strcpy»áµ¼ÖÂÊý×éÔ½½ç£» ¶ÔÊÔÌâ2£¬Èç¹ûÃæÊÔÕßÖ¸³ö×Ö·ûÊý×éstr1²»ÄÜÔÚÊý×éÄÚ½áÊø¿ÉÒÔ¸ø3·Ö£»Èç¹ûÃæÊÔÕßÖ¸³östrcpy(string,
str1)µ÷ÓÃʹµÃ´Óstr1ÄÚ´æÆð¸´ÖƵ½stringÄÚ´æÆðËù¸´ÖƵÄ×Ö½ÚÊý¾ßÓв»È·¶¨ÐÔ¿ÉÒÔ¸ø7·Ö£¬ÔÚ´Ë»ù´¡ÉÏÖ¸³ö¿âº¯Êýstrcpy¹¤×÷·½Ê½µÄ¸ø10
·Ö£»
¶ÔÊÔÌâ3£¬if(strlen(str1) <= 10)Ó¦¸ÄΪif(strlen(str1) <
10)£¬ÒòΪstrlenµÄ½á¹ûδͳ¼Æ'\0'ËùÕ¼ÓõÄ1¸ö×Ö½Ú¡£
ÆÊÎö£º
¿¼²é¶Ô»ù±¾¹¦µÄÕÆÎÕ£º
(1)×Ö·û´®ÒÔ'\0'½áβ£»
(2)¶ÔÊý×éÔ½½ç°ÑÎÕµÄÃô¸Ð¶È£»
(3)¿âº¯ÊýstrcpyµÄ¹¤×÷·½Ê½£¬Èç¹û±àдһ¸ö±ê×¼strcpyº¯ÊýµÄ×Ü·ÖֵΪ10£¬ÏÂÃæ¸ø³ö¼¸¸ö²»Í¬µÃ·ÖµÄ´ð°¸£º
2·Ö
void strcpy( char *strDest, char *strSrc )
{
while( (*strDest++ = * strSrc++) != '\0' );
Ïà¹ØÎĵµ£º
Chapter 1: Thread
¢Ù thread functions
1. pthread_self();
2. thread existing
you can get the value of rval_ptr just by pthread_join(pthread_t tht, void ** rval_ptr)
cancel a thread as the thread exits with PTHREAD_CANCELED in pthread_exit, this functio ......
Õâ¸ö³ÌÐò½ö¹©±à³Ì²Î¿¼
ÈôÏëÔÚƽʱÓã¬ÇëÏÂÔØ΢ÈíµÄwallpaper changer
ÎÒÕâ¸ö³ÌÐòʵÏÖÁ˶¨Ê±¸ü»»×ÀÃæ±³¾°µÄ¹¦ÄÜ
ÃüÁîÐÐ wallpaper "your images' directory path" time_in_minute
±à³ÌÒªµã
findfirstfile findnextfile ²éÕÒͼÏñÎļþ
SystemParametersInfo ÐÞ¸ÄϵͳÐÅÏ¢£¬ÔÚÕâ¶ùµ±È»ÊÇ×ÀÃæ±³¾°
×¢²á±í²Ù×÷ ±£´æÐ ......
ǶÈëʽϵͳÓÉÓÚÊܹ¦ºÄ¡¢³É±¾ºÍÌå»ýµÈÒòËصÄÖÆÔ¼£¬Ç¶Èëʽ΢´¦ÀíÆ÷µÄ´¦ÀíÄÜÁ¦Óë×ÀÃæϵͳ´¦ÀíÆ÷Ïà±ÈÒ²´æÔڽϴó²î¾à£¬¹ÊǶÈëʽϵͳ¶Ô³ÌÐòÔËÐеĿռäºÍʱ¼äÒªÇó¸üΪ¿Á¿Ì¡£
ͨ³££¬ÐèÒª¶ÔǶÈëʽӦÓóÌÐò½øÐÐÐÔÄÜÓÅ»¯£¬ÒÔÂú×ãǶÈëʽӦÓõÄÐÔÄÜÐèÇó¡£
1 ǶÈëʽ³ÌÐòÓÅ»¯µÄÀàÐÍ
&nbs ......
1.×Ô¶¨ÒåÊä³ö
Ïë±Ø´ó¼Ò¶¼ÓÐÀûÓÃÊä³öº¯ÊýÈçprintfÀ´°ïÖúÎÒÃǵ÷ÊÔ³ÌÐòµÄ¾Àú£¬ÕâÊÇÒ»ÖֱȽÏÔʼµÄ³ÌÐòµ÷ÊÔ¸¨Öú·½·¨£¬ÔÚLinuxÏÂÒ²¿ÉÒÔΪÎÒÃÇËùÓᣲ»¹ýÕâÖÖ·½·¨ÓÐÒ»¸öÃ÷ÏÔµÄȱµã£¬¾ÍÊÇÔÚµ÷ÊÔÍêºóÎÒÃDZØÐë×¢ÊÍ»òɾ³ýµôÕâЩ¸¨Öú´úÂë¡£Linux CÌṩÁË-DDEBUGÕâ¸ö±àÒë±ê¼ÇÀ´¶¨ÒåDEBUGÕâ¸ö·ûºÅ£¬½èÖúÓڸ÷ûºÅ£¬ÎÒÃÇ¿ÉÒÔÔÚÓ¦Ó ......
This is Edition 2.2.10 of `The `indent' Manual', for Indent Version
2.2.10, last updated 23 July 2008.
Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996 Free Software
Foundation, Inc. Copyright (C) 1995, 1996 Joseph Arceneaux. Copyright
(C) 1999 Carlo Wood. Copyright (C) 2001 David Ingamell ......