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

c ×Ö·ûÖ¸Õë char **ÊÇ·ñÐèÒª·ÖÅäÄÚ´æ - C/C++ / CÓïÑÔ

½ÓÊÕ¼üÅÌÊäÈën¸ö×î´ó³¤¶È100µÄ×Ö·û´®

  char ** p, *tmp;
  int i,n;

  clrscr();
  scanf("%d",&n);
  getchar();/*Ç建´æ*/

  for(i=0;i<n;i++)
  gets(*(p+i));

¶¨ÒåÁËpºó£¬Ã»Óе÷ÓÃmalloc·ÖÅäÄڴ棬ҲûÓÐÓ°Ïì³ÌÐòÔËÐС£


ÎÒÏëÎÊ£¬ÕâÑùÓÿÉÒÔô£¿»á²»»á°ÑÄÚ´æд»µ£¿»òÕßÓÐÄÚ´æй©µÈÆäËûÎÊÌ⣿
Òª·ÖÅäÄÚ´æ²»Òª¿¿ÈËÆ·¡£ÄãÕâ´ÎûÎÊÌ⣬²»±£Ö¤ÄãÏ´λ¹ÓÐÕâôºÃÔËÆø¡£



pûÓÐÖ¸ÏòºÏ·¨Äڴ棬ÊÇÒ»¸öÒ°Ö¸Õ룬¶ÔÒ°Ö¸Õë²Ù×÷£¬ÆÆ»µÁËÄڴ棬ºó¹û±È½ÏÑÏÖØ£¬¿ÉÄÜ»á±ÀÀ££¬¿ÉÄÜÊǼ«ÆäÒþ²ØµÄBUG¡£

²»ÐèÒª¸øËü±¾Éí·ÖÅäÄڴ棬µ«ÊÇËüÖ¸ÏòµÄÓ¦¸ÃÊÇÒѾ­·ÖÅäºÃµÄÄÚ´æ

ÒýÓÃ
½ÓÊÕ¼üÅÌÊäÈën¸ö×î´ó³¤¶È100µÄ×Ö·û´®

char ** p, *tmp;
int i,n;

clrscr();
scanf("%d",&amp;n);
getchar();/*Ç建´æ*/

for(i=0;i<n;i++)
gets(*(p+i));

¶¨ÒåÁËpºó£¬Ã»Óе÷ÓÃmalloc·ÖÅäÄڴ棬ҲûÓÐÓ°Ïì³ÌÐòÔËÐС£


ÎÒÏëÎÊ£¬ÕâÑùÓÿɡ­¡­

Â¥Ö÷ÓõÄÊÇtc°É£¬ÎÒ¸Õ¿ªÊ¼ÓÃËüµÄʱºòҲûעÒâ¹ý¸øÖ¸Õë·ÖÅäÄÚ´æ·½ÃæµÄ¶«Î÷¡£ºó¾­¹ý±ðÈ˵ÄÖ¸µ¼²Å¸Ä¹ýÀ´¡£
ȷʵÔÚtcϲ»»á±¨´í£¬Ä㿽±´µ½vsϾͻá³öÎÊÌâÁË.

Ò°Ö¸ÕëÊǺֲܿÀ

¿ÉÊÇÎÒ¸ÄÔõô·ÖÄØ£¿

p=(char *)malloc(100*n*sizeof(char));

ÊÇÕâÑù·Öô£¿

ÒýÓÃ
¿ÉÊÇÎÒ¸ÄÔõô·ÖÄØ£¿

p=(char *)malloc(100*n*sizeof(char));

ÊÇÕâÑù·Öô£¿


Ïà¹ØÎÊ´ð£º

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

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

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

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

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

¸ÕѧÍêCµÄ»ù´¡£¬ÇóÏÂÒ»²½ - C/C++ / CÓïÑÔ

ÎÒ¸Õ°ÑÌ·ºÆÇ¿µÄµÚÈý°æµÄÊéѧÍ꣬ÎÒÖªµÀµÄÓÐC++£¬CºÍÖ¸Õë CȱÏݺÍÏÝÚå Cר¼Ò±ä³É£¬»¹ÓÐÊý¾Ý½á¹¹£¬ÎÒÏëÎÊÎÊÎÒÓ¦¸ÃÒÔʲô˳ÐòÀ´Ñ§ÄØ
CȱÏݺÍÏÝÚå Cר¼Ò±à³Ì
Êǽø½×µÄ£¬²»Óü±×Å¿´
ÖÁÓÚ
CºÍÖ¸Õë 
Äã²»Àí½âÖ ......

ÓйØAccessÊý¾Ý¿â´æÈ¡µÄÎÊÌâ - C++ Builder / »ù´¡Àà

ÈçºÎ½«Ò»¸öListBoxÖеÄÊý¾Ý´æÔÚÊý¾Ý¿âÖеÄÒ»¸ö×Ö¶ÎÏÂÃ棬²¢ÇÒÿÌõ¼Ç¼µÄ×Ö·û´®¸öÊý²»Ò»¶¨ ÒÔ¼°ÈçºÎ´ÓÊý¾Ý¿âÖжÁÈ¡¸ÃListBoxÖеÄËùÓмǼ
C/C++ code:

//´æÈëÊý¾Ý¿â
void __fastcall TForm1::Button5Click(TO ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ