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

realview MDK C/C++ »ìºÏ±à³ÌÎÊÌâ(ÐøÒ»)

    Ç°¼¸ÌìдÁ˹ØÓÚKeilÓëC/C++»ìºÏ±à³ÌµÄÈô¸ÉÎÊÌ⣬½ñÌìдµÄÊǼÌÐøÇ°ÃæµÄ¡£
   
    ÔÚʹÓÃC/C++»ìºÏ±à³ÌµÄʱºò£¬³ÌÐòÔËÐе½ÀàÀïÃæµÄÐéÄ⺯ÊýʱËÀµô£¬²é¿´ÆävptrֵΪ0x00000000£¬Õâʱºò²»ÖªµÀÔõô½â¾ö£¬ºóÀ´×Ô¼º±àÁËÒ»¸öʵÀý³ÌÐò¿ÉÒÔͨ¹ý£¬·¢ÏÖvptrµÄÖµÊÇÔÚ__mainÀïÃæµÄ __rt_lib_initº¯Êý³õʼ»¯µÄ¡£ÕâÊÇÓÃÓÚ³õʼ»¯C¿âµÄº¯Êý£¬£¨ÎÒûÓÐÓó£¹æµÄ»ã±àÌøתµ½__main£¬È»ºóÌøµ½Óû§µÄmainº¯Êý£¬ËùÒÔµ¼ÖÂûÓÐÖ´ÐР__rt_lib_init£¬×îÖÕµ¼ÖÂÎÒµÄÀàÀïÃæµÄÐéÄ⺯ÊýÎÞ·¨ÔËÐУ©¡£
   
    ÏÖÔÚ½â¾öÎÊÌâ¾ÍºÜÃ÷ÏÔÁËÔÚÎÒµÄC³ÌÐòÀïÃæÌí¼Ó __rt_lib_init(0x0,0x0);¾ÍOKÁË¡£
½ÓÏÂÀ´ÓÖÓÐÒ»¸öÎÊÌ⣬±àÒëµÄʱºòÌáʾ£º__use_no_semihosting_swi was requested ,but __sys_command_string was referenced.
    ¸ãÁ˺þòŷ¢ÏÖÎҵĴúÂëÀïÃæÓУº#pragma import(__use_no_semihosting_swi)£¬ÎÒ¶¼²»ÖªµÀʲôʱºòÌí¼Ó½øÈ¥µÄ£¬Á¢Âí×¢Ê͵ô£¬Ò»ÏÂ×ӾͿÉÒÔ±àÒëͨ¹ýÁË£¡


Ïà¹ØÎĵµ£º

linux C gbk utf 8±àÂëת»»

ÓÃlinux C ϵĺ¯Êýµ÷Óô´½¨ÖÐÎÄĿ¼¡¢ÎļþµÈ£¬×Ö·û´®µÄ±àÂë¸ñʽҪÇóÊÇutf-8¸ñʽµÄ¡£
±ÈÈçÏëҪʹÓà int mkdir(const char *pathname, mode_t mode); ´´½¨Ò»¸öÖÐÎĵÄĿ¼¡£ÄÇôpathnameµÄ±àÂë¸ñʽҪÇóÊÇutf-8µÄ£¬¶ø²»ÄÜÊÇgb3212/gbkµÄ£¬·ñÔò¾ÍÊÇÂÒÂë¡£
ÄÇôÈç¹ûlinux CÏÂÈçºÎ½øÐÐgbk<---->utf-8±àÂëת»»µÄ±àÂë×°»»µÄ ......

dz̸CÖеÄmallocºÍfreeº¯Êý

Ò»¡¢malloc()ºÍfree()µÄ»ù±¾¸ÅÄîÒÔ¼°»ù±¾Ó÷¨
1¡¢º¯ÊýÔ­Ðͼ°ËµÃ÷
void *malloc(long NumBytes)£º¸Ãº¯Êý·ÖÅäÁËNumBytes¸ö×Ö½Ú£¬²¢·µ»ØÁËÖ¸ÏòÕâ¿éÄÚ´æµÄÖ¸Õë¡£Èç¹û·ÖÅäʧ°Ü£¬Ôò·µ»ØÒ»¸ö¿ÕÖ¸Õ루NULL£©¡£ ¹ØÓÚ·ÖÅäʧ°ÜµÄÔ­Òò£¬Ó¦¸ÃÓжàÖÖ£¬±ÈÈç˵¿Õ¼ä²»×ã¾ÍÊÇÒ»ÖÖ¡£
void free(void *FirstByte)£º ¸Ãº¯ÊýÊǽ«Ö®Ç°ÓÃmalloc· ......

sizeofÃæÊÔÌâÑ¡ Linux C±à³Ìʵս

   ½á¹¹ÌåºÍ¹²ÓÃÌåµÄÄÚ´æ·ÖÅäÊÇCÓïÑÔµÄÒ»¸öÄѵ㣬ҲÊÇÃæÊÔÌâÖеÄÈȵ㡣
ʾÀý1£º
   Union data1
 {
  double  d;
  int     i;
  char    c1;
  char    c2[9]; 
 };
  sizeof(union data1 ......

Pro*C ÖÐǶÈëpl/sql¿é

/* °üº¬CÍ·Îļþ */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
/* °üº¬SQLCAÍ·Îļþ */
EXEC SQL INCLUDE sqlca;
EXEC SQL INCLUDE sqlda;
int main()
{
    EXEC SQL BEGIN DECLARE SECTION;
    int  money;
    ......

ÈçºÎѧϰlinuxϵÄc/c++±à³Ì

ÎҼƻ®µÄѧϰÀú³Ì£º
1. cºÍc++µÄ»ù´¡ÖªÊ¶£¬Õâ¸öºÍ²Ù×÷ϵͳÎ޹أ¬ÔÚwindowsÉÏÒ²¿ÉÒÔѧ¡£cÓïÑÔÓï·¨Ïà¶Ô¼òµ¥Ò»µã£¬c++²»ÐèÒª°ÑËùÓеÄ֪ʶµã¶¼Ñ§»á£¬ÒªÖªµÀ»ù±¾µÄ·â×°£¬¼Ì³Ð£¬¶à̬֮ÀàµÄ£¬»¹ÓÐSTL¡£¸üÉîÈëµÄѧϰӦ¸ÃÊÇÔÚÒÔºóµÄ¹¤×÷ÖÐÓöµ½ÎÊÌâÁËÔÙÈ¥²é×ÊÁÏ¡£
2. ¿´Ê顶APUE¡·£¬×öÊéÉϵÄÏ°Ì⣬ÕÆÎÕÎļþ£¬ÏµÍ³µ÷Óã¬Ï̡߳¢½ø³Ì¡¢ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ