C/C++ÖÐcharÐÍÖ¸ÕëÎÊÌ⠸߷ÖÏàÔù - C/C++ / C++ ÓïÑÔ
ÎÒÏ뿪±ÙÒ»¸ö10000´óµÄcharÐÍÖ¸Õ룬ÇëÎÊÈçºÎŪ£¿charÐ͵ÄÖ¸Õë²»ÄÜ¿ª±ÙÌ«´óѽ£¬Ôõô²ÅÄÜÎÞÇî´ó£¿£¿£¿
ÒòΪÎÒÏë´ÓÒ»¸öÎļþÖжÁÈ¡Êý¾Ý£¬ÓÃcharÐÍÖ¸Õë±£´æ
ÓÃmalloc·ÖÅäÒ»¸öÄÇô´óµÄ¿Õ¼ä°É
ÎÞÇî´ó¹À¼ÆÊDz»ÐеİÉ
ÆäʵָÕë¾ÍÄǸö´ó£¬4¸ö×Ö½Ú£¬¹Ø¼üÊÇËûÖ´ÐеÄÊý×éÓжà´ó¡£¡£¡£
¿ÉÒÔµÄ
ÀíÂÛÉÏ¿ÉÒÔ·ÖÅä4G£¬²»¹ýwindowsϺÃÏñÖ»ÄÜ2G°É
Óöà´ó£¬¾Ímalloc·ÖÅä¶à´ó£¬²»¿ÉÄÜÎÞÇî´ó£¬¾ÍËãÎļþ´ó£¬Ò²²»ÐèÒªÕû¸öÎļþ¶ÁÈëÄÚ´æ
ÔÚ¶ÑÉÏnewÒ»¸ö´óµÄÊý×é°É ÎÞÇî´óÊDz»¿ÉÄÜµÄ 32 ,64λϵͳ ÀíÂÛÉÏ×î´ó·Ö±ðÖ§³Ö2^32£¬2^64×Ö½ÚÄÚ´æ
char* p = new char[10000];
Ôõô²ÅÄÜÎÞÇî´ó£¿£¿£¿ ÏȰÑÄãµÄÄÚ´æÅªµ½ÎÞÇî´óÔÙ˵
C/C++ code:
ÎÒÏ뿪±ÙÒ»¸ö10000´óµÄcharÐÍÖ¸Õ룬ÇëÎÊÈçºÎŪ
c: char** p = (char**) malloc(sizeof(char*)* 10000);
c++: char** p = new char*[10000];
ÎÞÇî´ó...........
Äã²»ÅÂÄãµÄϵͳ±Àµô°¡£¿£¿£¿£¿
¶ÁÎļþô
ÓÃÄÚ´æÓ³ÉäÎļþ°É
Ïà¹ØÎÊ´ð£º
±¾ÈËÕýÔÚÓÃJava×öÒ»¸öC/S¼Ü¹¹µÄÏîÄ¿£¬
¿ÉÊÇÓÉÓÚÏîÄ¿±È½Ï´ó£¬Ç°ÆÚ¶Ô¼Ü¹¹µÄÉè¼ÆÓÈÆäÖØÒª£¬ÒòΪºóÆÚ¿ÉÄÜËæÊ±»á¼Ó¸ö¹¦ÄÜ»òÕßÈ¥µôijЩ¹¦ÄÜ¡£
ËùÒÔÌØµØÑ°ÇóÈçºÎÉè¼ÆC/SµÄ¼Ü¹¹Ê¹³ÌÐò¸ü¼ÓÃæÏò¶ÔÏó¸ü¼ÓÒ×ÓÚά ......
´ó¼ÒºÃ£º
ÎÒÏëʵÏÖ¼ì²âµ½²åÈëSD¿¨ºó×Ô¶¯½«SD¿¨¸ñʽ»¯µÄ¹¦ÄÜ£¬²»ÖªC/C++ÖÐÓÐûÓиñʽ»¯UÅ̵ĺ¯Êý£¿
ÁíÍ⣬ÎÒ²»ÏëʹÓÃSHFormatDrive£¬ÒòΪÕâ¸öº¯Êý»áµ¯³öÊÇ·ñÒª¸ñʽ»¯µÄÌáʾ¿ò£¬ÎÒÐèÒªµÄÊÇϵͳ×Ô¶¯¸ñʽ»¯£¬¶ø²Ù×÷Õß² ......
ËÄܰïÎÒ°ÑÏÂÃæÕâЩ´úÂë¸Ä³ÉVBÐÎʽµÄ£¬¶àлÁË£¬¼±ÓÃ~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[],float g ......
¹«Ë¾¿ª·¢Ò»¸ö´¥ÃþÆÁ³ÌÐò£¬ÎÒ¸ºÔðµÄÒ»¿é£¬ÊµÏÖÕâÑùÒ»¸ö¹¦ÄÜ£¬µ±Êó±êµã»÷´°¿ÚÖÐͼƬ£¨Ò»ÕÅͼ·Ö³É¼¸²¿·Ö£©µÄÆäÖÐÒ»²¿·Öʱ£¬½«Õⲿ·ÖͼƬ½ØÈ¡³öÀ´£¬µ¯³öеĴ°¿Ú£¬½«½ØÈ¡³öµÄͼƬÏÔʾ³öÀ´¡£ÎÒʹÓÃRectangeÀà¿ØÖÆÁË·µ»Ø£¬ ......
ÈçºÎ½«Ò»¸öListBoxÖеÄÊý¾Ý´æÔÚÊý¾Ý¿âÖеÄÒ»¸ö×Ö¶ÎÏÂÃæ£¬²¢ÇÒÿÌõ¼Ç¼µÄ×Ö·û´®¸öÊý²»Ò»¶¨ ÒÔ¼°ÈçºÎ´ÓÊý¾Ý¿âÖжÁÈ¡¸ÃListBoxÖеÄËùÓмǼ
C/C++ code:
//´æÈëÊý¾Ý¿â
void __fastcall TForm1::Button5Click(TO ......