Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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));

ÊÇÕâÑù·Öô£¿


Ïà¹ØÎÊ´ð£º

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

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

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

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

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Öж¨ÒåµÄ·½·¨ ......

ÇóÖú£ºC´úÂë¸Äд³ÉVB´úÂë - VB / »ù´¡Àà

Ë­ÄÜ°ïÎÒ°ÑÏÂÃæÕâЩ´úÂë¸Ä³ÉVBÐÎʽµÄ£¬¶àлÁË£¬¼±ÓÃ~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[],float g ......

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

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

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

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