cÖкÍjavaÖÐÊý×éµÄÇø±ð
¶ÔÓÚÔÓïÀàÐ͵ÄÊý×飬Èçint[] a,ÔÚCÀïÃæÖ»ÒªÕâÑù¶¨ÒåÖ®ºó¾Í¿ÉÒÔÓÃa[i]ʹÓÃÁË£¬µ«ÊÇÔÚJAVAÀïÃæÊDz»Ðеģ¬±ØÐëÓÃint[] a = new int[LENGTH];À´ÎªÊý×é·ÖÅä¿Õ¼ä¡£ÕâÀïµÄa¸üÓ¦¸Ã¿´³ÉCÀïÃæµÄÖ¸Õ룬ËüºÍCÀïÃæµÄint* aÊÇÒ»ÑùµÄ£¬ÒòΪÕâ¸öa£¨CÀïÃæµÄ£©Ò²ÒªÏÈmallocÒ»¸ö¿Õ¼äÖ®ºó²Å¿ÉÒÔÓá£
¶ÔÓÚ¶ÔÏóÊý×飬ÔòÒª“Á½´Î·ÖÅ䔣¬È磺
Object[] obj = new Object[2];
obj[0] = new Object();
obj[1] = new Object();
ÒòΪÊý×éÊ×ÏÈÊÇÒ»¸ö¾ä±ú£¬¶øÕâ¸ö¾ä±úÖ¸ÏòµÄ2¸ö¿Õ¼äÀïÃæÓÖÊÇ´æ´¢×ÅÁ½¸öÖ¸ÏòObjectÀàÐ͵ľä±ú¡£
¶øCÀïÃæ²»ÍêÈ«Ïàͬ£º
struct Object{};
struct Object* obj = (struct Object *)malloc(2 * sizeof(struct Object));
ÆäʵËûÃǵÄÔÀí´óÖÁÊÇÏàͬµÄ¡£Ö»²»¹ýJAVAÀïÊý×éµÄÄÚ´æ·ÖÅäÊÇÔÚ¶ÑÀïÃæµÄ£¬±ØÐëÓÃnew À´·ÖÅ䣬¶øCÀïÃæÊÇÔÚÕ»ÀïÃæ·ÖÅäµÄ£¬¶¨ÒåµÄʱºò»á×Ô¶¯·ÖÅä¡£
ÔÚ¡¶Thinking in JAVA¡·ÖÐÓиüÏêϸµÄ½éÉÜ¡£
javaÔÚÉùÃ÷Êý×éµÄʱºò²»ÄܼÓÊýÁ¿µÄ.Ö»Äܳõʼ»¯µÄʱºò¼Ó
int[] a = new int[3]; »ò
int a[] = new int[3]; ¶¼ÐÐ
cÓïÑÔÖÐ,ÉùÃ÷µÄʱºò¼Ó²»¼ÓÊýÁ¿¶¼¿ÉÒÔ
int a[3] = {1,2,3};
int a[] = {1,2,3};
Ïà¹ØÎĵµ£º
ÍøÂçËѼ¯-×ÊÁÏ
¸ñʽ»¯ÊäÈëÊä³öº¯Êý
Turbo C2.0 ±ê×¼¿âÌṩµÄÁ½¸ö¿ØÖÆ̨¸ñʽ»¯ÊäÈë¡¢ Êä³öº¯Êý£ºprintf( ) ¡¢scanf()¡£
printf()º¯ÊýÓÃÀ´Ïò±ê×¼Êä³öÉ豸(ÆÁÄ»)дÊý¾Ý;
scanf() º¯ÊýÓÃÀ´´Ó±ê×¼ÊäÈëÉ豸(¼ü ......
1.
ÔËÐÐʱ¿âµÄ·¾¶
Ö¸¶¨·½Ê½£º
£¨1£©
Á¬½ÓÑ¡Ïî
–libpath
£¨2£©
»·¾³±äÁ¿
ARMLIB
ÓÅÏȼ¶£º
libpath
¸ßÓÚ
ARMLIB
±»Ö¸¶¨µÄ·¾¶£º
°üº¬
a ......
ѧϰlinuxϵÄc/c++±à³Ì
1£¬ÏÈÓÐlinux»·¾³
´îminGWºÍcygwin¶¼ÓеãÂé·³£¬×î×î¼òµ¥µÄ°ì·¨»¹ÊÇ×°¸öÕæÕýµÄlinux£¬ÓÃÐéÄâ»úÒ²ºÃ£¬ÔÚÍøÂçÉϵÄÁíһ̨»úÆ÷Ò²ºÃ¡£ÕâÑù²»½ö¿ì£¬¶øÇÒÄãÓÐÁËÕæÕýµÄ»·¾³¡£
2.»áC/C++ÓïÑÔ£¨¹À¼ÆÄã»áµÄ£©
3.ÈëÃŽ׶ÎÊìϤgccÃüÁîÐУ¬×î»ù±¾µÄ²ÎÊý£¬È磬-g,-W,-O,-o,-c ½¨Òé¿´man gcc(ºÜ´óÕÒÏ ......
ÔÚʹÓÃCÓïÑÔ±àд´óÐ͹¤³ÌʱҪÓõ½ÃæÏò¶ÔÏóÓïÑÔÖеÄһЩÌØÐÔ£¨ÄÚºËÖÐijЩ²¿·Ö¾ÍÓ¦ÓÃÁËÕâЩÌØÐÔ£©¡£CÓïÑÔÊÇ»ùÓÚÎļþµÄÀ࣬static¹Ø¼ü×ÖÉùÃ÷˽ÓÐÊý¾Ý³ÉÔ±£¬¹«ÓÐÊý¾Ý³ÉÔ±±ØÐ붨Ò嵽ͷÎļþ£¬»òÓÉÆäËüÎļþʹÓÃextern¹Ø¼ü×ÖÉùÃ÷À´Ê¹Óᣵ«ºóÕßÒýÓùØϵ²»ÇåÎú¡£Í·Îļþ¾Í³ÉÁ˹«ÓÐÊý¾Ý³ÉÔ±ÉùÃ÷µÄµØ·½¡£
Í·ÎļþÖÐÓ¦¸Ã°üº¬ÒÔϼ°·½ÃæÄÚ ......
(±¾ÎÄÔ´×Ôhttp://www.weste.net/2006/2-20/13432127659.html )¡¡¡¡
Ðí¶àÃæÊÔÌâ¿´ËƼòµ¥£¬È´ÐèÒªÉîºñµÄ»ù±¾¹¦²ÅÄܸø³öÍêÃÀµÄ½â´ð¡£ÆóÒµÒªÇóÃæÊÔÕßдһ¸ö×î¼òµ¥µÄstrcpyº¯Êý¶¼¿É¿´³öÃæÊÔÕßÔÚ¼¼ÊõÉϾ¿¾¹´ïµ½ÁËÔõÑùµÄ³Ì¶È£¬ÎÒÃÇÄÜÕæÕýдºÃÒ»¸östrcpyº¯ÊýÂð£¿ÎÒÃǶ¼¾õµÃ×Ô¼ºÄÜ£¬¿ÉÊÇÎÒÃÇд³öµÄstrcpyºÜ¿ÉÄÜÖ»ÄÜÄõ½10·ÖÖÐ ......