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

GNU C ANSI C Ò»Ð©Çø±ð

1 ¿É±äÊý¾Ý½á¹¹
struct var_data
{
    int len;
    char data[0];
};
±éÀúlenºóÊý¾Ý
for(i = 0; i < s.len; i++)
{
   printf("%02x",s.data[i]);
}
2 case ·¶Î§Çø¼ä ¡¾x£¬y¡¿
3 Óï¾ä±í´ï
#define min_t (type, x, y) \
({  type __x = (x); type __y = (y); __x < __y ? __x: __y;})
int ia, ib, mini;
float fa, fb, minf;
mini = min_t ( int, ia, ib);
minf = min_f (float, fa, fb);
±ê×¼c£º
#define min (x, y) ((x) < (y) ? (x) : (y))
´úÂëmin ( ++ia, ++ib£© ±»Õ¹¿ªÎª £¨£¨++ia) < (++ib) ? (++ia):(++ib)) ia£¬ib ±»¼ÓÁËÁ½´Î¡£
4 typeof
#define min(x, y) ( {\
const typeof(x) __x = £¨x£©; \
const typeof(y) __y = £¨y£©;\
(void) (&__x ==&__y); \
__x <_ _y ? __x : __y ;})
5 pr_debug ¿É·ÀÖ¹ÔÚ²ÎÊýÑ¡Ïî²»´ú±íÈκβÎÊýµÄʱºò ²»Êä³ö£¬¡£
6 ¿ÉÖ¸¶¨·¶Î§³õʼ»¯Êý×é unsigned char data [MAX] = { [0 ... MAX - 2] = 0};
½á¹¹Ìå³ÉÔ±³õʼ»¯½á¹¹Ì壺
struct file_operations ext2_file_operations =
{
llseek:generic_file_llseek,
read: generic_file_read,
}
ͬÑù£¬±ê×¼c£º
struct file_operations ext2_file_opreations =
{
.llseek       = generic_file_llseek,
.read         = generic_file_read,
}
.....


Ïà¹ØÎĵµ£º

ͨÅä·ûµÄ C ÓïÑÔÔ´´úÂë

/* find files from wildcards, for MicroSoft C v4.0 */
/* ------------------------------------------------------------ */
/*   copyright 1986:      */
/*   Nourse Gregg & Browne, Inc.  */
/*   1 Horizon Road. #612 ......

ѧcµÄºÜ¶à

cѧµÄÈ˺ܶࡣµ«Ê®Ö®°Ë¾ÅÊǰëͰˮ¡£»òÕßдµÃºÜËÀ¡£Ò²ÐíÎÒÕâ»°ÓÐµãÆ«¼¤¡£µ«ÊÇÎÒ¸ø³öÒ»¸ö±ê×¼°É¡£ÄãÄÜд³öÏñlinuxÄں˴úÂëÕâÑùµÄ´úÂëÂð£¿ÆäʵÈκÎÒ»ÃÅÓïÑԵľ«Ë裬ÔÚÓÚÔËÓá£ËùÒÔÔÚѧϰ֮ǰ×îºÃÎÊÒ»ÎÊÎÒΪʲҪѧÕâÃÅÓïÑÔ¡£Èç¹ûÊÇΪѧ¶øÑ§£¬Ñ§µ½×îºóÓÖÊǰëͰˮ¡£»¹ÕæµÄ²»È翴С˵À´µÃ´Ì¼¤¡£Ã»ÓÐÄ¿µÄ¸ÉÊÂÇ飬±¾Éí¾ÍÊÇÒ»ÖÖÀË·Ñ¡£ ......

C »ã±à»ìºÏ±à³Ì

As is Known to us,the function Main is the entry point of all programs.Therefore, we are usually neglecting all that we don't do,which makes us not understanding it more clearly.Now there is a sample arm program which will provide something that opration system usually do.
asm:
 &nb ......

cµÄ¹ØÓÚÊý×é³õʼ»¯ ºÍ memsetÓ÷¨

½ñÌìΪÁ˳¹µ×¸ã¶¨Ò»¸ö¹ØÓÚcÖÐÊý×é³õʼ»¯ºÍÉùÃ÷²»Í¬Çé¿öÏ£¬±ÈÈçÖ»ÉùÃ÷Ò»¸öÊý×échar str[20];ÄÇôÕâstrÀïÃæÊÇʲôÄÚÈÝÄØ£¿ÎÒÓÃvc6++£¬debugÏ¿´µ½¶¼ÊÇ-56¶öascÂ룬ºóÀ´Çë½ÌÁËÒ»¸ö»ªÎªµÄ´óÅ££¬Ëû˵ °´ÕÕÀíÂÛÀ´ËµÀïÃæµÄÄÚÈݶ¼ÊÇÓпÉÄܵģ¬ÕâºÍ½Ð×ö“ÔàÄÚ´æ”»òÕß½Ð×ö“Ò°Êý×锡£ºÃÁ˵ÚÒ»¸öÎÊÌâ¸ã¶®ÁË¡£
......

Code::Blocks Âú×ãÄãÈκοÁ¿ÌµÄÒªÇóµÄC/C++ IDE


     Code::BlocksÊÇÒ»¸öÃâ·Ñ¡¢¿ªÔ´¡¢¿çƽ̨µÄIDE£¬Ê¹ÓÃC++¿ª·¢£¬²¢ÇÒʹÓÃwxWidgets×öΪGUIº¯ÊÔ¿â¡£Code::BlocksʹÓÃÁ˲å¼þ¼Ü¹¹£¬Æä¹¦ÄÜ¿ÉÒÔʹÓòå¼þ×ÔÓɵØÀ©³ä¡£Ä¿Ç°£¬ 
Code::BlocksÖ÷ÒªÕë¶Ô¿ª·¢C£¯C++³Ìʽ¶øÉè¼Æ¡£
ÓÉÓÚËü¿ª·ÅÔ´ÂëµÄÌØµã£¬WindowsÓû§¿ÉÒÔ²»ÒÀÀµÓÚVS.NET£¬±àд¿çƽ̨C++Ó¦Ó ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ