½ÓÊÕ¼üÅÌÊäÈën¸ö×î´ó³¤¶È100µÄ×Ö·û´®
char ** p, *tmp;
int i,n;
clrscr();
scanf("%d",&n);
getchar();/*Ç建´æ*/
for(i=0;i<n;i++)
gets(*(p+i));
¶¨ÒåÁËpºó£¬Ã»Óе÷ÓÃmalloc·ÖÅäÄڴ棬ҲûÓÐÓ°Ïì³ÌÐòÔËÐС£
ÎÒÏëÎÊ£¬ÕâÑùÓÿÉÒÔô£ ......
C/C++ code:
ÌâÄ¿£ºÓÐ1¡¢2¡¢3¡¢4¸öÊý×Ö£¬ÄÜ×é³É¶àÉÙ¸ö»¥²»ÏàͬÇÒÎÞÖظ´Êý×ÖµÄÈýλÊý£¿¶¼ÊǶàÉÙ£¿
¡¡¡¡1.³ÌÐò·ÖÎö£º¿ÉÌîÔÚ°Ùλ¡¢Ê®Î»¡¢¸öλµÄÊý×Ö¶¼ÊÇ1¡¢2¡¢3¡¢4¡£×é³ÉËùÓеÄÅÅÁкóÔÙÈ¥µô²»Âú×ãÌõ¼þµÄÅÅÁС£
¡¡¡¡2.³ÌÐòÔ´´úÂ룺
¡¡¡¡main()
¡¡¡¡{
¡¡¡¡int i,j,k;
¡¡¡¡printf("\n");
¡¡¡¡for(i=1;i<5 ......
±ÈÈçÓиöÎļþÄÚÈÝ
01:aaaaaaaaaa
02:bbbbbbbbb
03:cccccccccccc
04:ddddddddddd
05:eeeeeeeeee
Ôõô¸ù¾Ý03Õâ¸öÐкÅÀ´É¾³ýÄÇÒ»ÐÐÄØ£¿ ±ä³ÉÈçÏ£º
01:aaaaaaaaaa
02:bbbbbbbbb
04:ddddddddddd
05:eeeeeeeeee
˼·£ºÏÈÓÃfseekÕÒµ½ÒªÉ¾³ýµÄ¼Ç¼µÄλÖÃ,È»ºó½«´ËλÖÃ֮ǰµÄ¼Ç¼ÖØÐÂд
ÈëÒ»¸öÎļþ,È»ºóÔÙ½«ÎļþÖ¸ÕëÒƵ ......
±¾ÈËÓÐÒ»¸öCÏîÄ¿£¬ÒªÓõ½client-server,µ«ÊÇÒÔÇ°´Óû½Ó´¥¹ýc/sµÄ¶«Î÷£¬ÓÐûÓÐËÄÜÍƼöһЩºÃµÄÎÄÕ£¬ÎÄÕÂ×îºÃÄܾßÌå½âÊÍʵÏֵķ½·¨ºÍÔÀí¡£Ð»Ð»
http://www.cnki.com.cn/Article/CJFDTotal-KJIG200803068.htm
http://download.csdn.net/source/1099061
µ½ÍøÉÏËÑË÷һЩsocket·þÎñÆ÷±à³ÌµÄ¶«Î÷,Èç¹ûд¸ö¼òµ¥µÄsocket ser ......
×îºÃÓÐ×¢Ê͹þ
лÁË`
£¨1£©£ºÕÒ³öÏÂÃæÕâÁ½¶Î³ÌÐòÖеĴíÎó£º
void test1()
{
¡¡char string[10];
¡¡char* str1 = "0123456789";
¡¡strcpy( string, str1 );
}
test2( int* p1,int* p2 )
{
¡¡int *p;
¡¡*p = *p1;
¡¡*p1 = *p2;
¡¡*p2 = *p;
}¡¡¡¡
£¨2£©£º£º±àдһ¸öÓÃÓÚ×Ö·û´®¸´ÖƵĺ¯Êý(strcpy)
} ......
±äÁ¿ÀàÐÍ
TCHAR CName[20];
TCHAR Psw[20];
×Ö¶ÎÀàÐÍ
PassWord UserName¶¼ÎªÎı¾£¬Ó¦¸ÃÔõôдѽ
ÎÒ×Ô¼ºÐ´µÄÕâÌõ£¬²»ÕýÈ·£¬×ÜÊDzéѯ²»µ½£¬Ë³´ø¿´¿´ÊÇʲôÎÊÌâ°¡
"SELECT * from UName WHERE UserName= '+TName+' AND PassWord= '+Psw"
"SELECT * from UName WHERE UserName= '"+TName+&quo ......