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

Cö¾ÙÀàÐ͵ÄʹÓ÷½·¨

1.  ö¾ÙµÄ¶¨Òåö¾ÙÀàÐͶ¨ÒåµÄÒ»°ãÐÎʽΪ£º
    enum ö¾ÙÃû{ ö¾ÙÖµ±í };
ÔÚö¾ÙÖµ±íÖÐÓ¦ÂÞÁгöËùÓпÉÓÃÖµ¡£ÕâЩֵҲ³ÆÎªÃ¶¾ÙÔªËØ¡£
ÀýÈ磺
   
¸Ãö¾ÙÃûΪweekday£¬Ã¶¾ÙÖµ¹²ÓÐ7¸ö£¬¼´Ò»ÖÜÖÐµÄÆßÌì¡£·²±»ËµÃ÷ΪweekdayÀàÐͱäÁ¿µÄȡֵֻÄÜÊÇÆßÌìÖеÄijһÌì¡£
2.  ö¾Ù±äÁ¿µÄ˵Ã÷
Èçͬ½á¹¹ºÍÁªºÏÒ»Ñù£¬Ã¶¾Ù±äÁ¿Ò²¿ÉÓò»Í¬µÄ·½Ê½ËµÃ÷£¬¼´Ïȶ¨Òåºó˵Ã÷£¬Í¬Ê±¶¨Òå˵Ã÷»òÖ±½Ó˵Ã÷¡£
ÉèÓбäÁ¿a,b,c±»ËµÃ÷ΪÉÏÊöµÄweekday£¬¿É²ÉÓÃÏÂÊöÈÎÒ»ÖÖ·½Ê½£º
enum weekday{ sun,mou,tue,wed,thu,fri,sat };
enum weekday a,b,c;
»òÕßΪ£º
enum weekday{ sun,mou,tue,wed,thu,fri,sat }a,b,c;
»òÕßΪ£º
enum { sun,mou,tue,wed,thu,fri,sat }a,b,c;
 
ö¾ÙÀàÐÍÔÚʹÓÃÖÐÓÐÒÔϹ涨£º
1.  ö¾ÙÖµÊdz£Á¿£¬²»ÊDZäÁ¿¡£²»ÄÜÔÚ³ÌÐòÖÐÓø³ÖµÓï¾äÔÙ¶ÔËü¸³Öµ¡£
  ÀýÈç¶Ôö¾ÙweekdayµÄÔªËØÔÙ×÷ÒÔϸ³Öµ£º
    sun=5;
mon=2;
sun=mon;
¶¼ÊÇ´íÎóµÄ¡£
2.  ö¾ÙÔªËØ±¾ÉíÓÉϵͳ¶¨ÒåÁËÒ»¸ö±íʾÐòºÅµÄÊýÖµ£¬´Ó0¿ªÊ¼Ë³Ðò¶¨ÒåΪ0£¬1£¬2…¡£ÈçÔÚweekdayÖУ¬sunֵΪ0£¬monֵΪ1£¬…,satֵΪ6¡£
¡¾Àý11.10¡¿
main(){
    enum weekday
    { sun,mon,tue,wed,thu,fri,sat } a,b,c;
    a=sun;
    b=mon;
    c=tue;
    printf("%d,%d,%d",a,b,c);
}
˵Ã÷£º
Ö»ÄܰÑö¾ÙÖµ¸³Óèö¾Ù±äÁ¿£¬²»ÄܰÑÔªËØµÄÊýÖµÖ±½Ó¸³Óèö¾Ù±äÁ¿¡£È磺
    a=sum;
b=mon;
ÊÇÕýÈ·µÄ¡£¶ø£º
    a=0;
b=1;
ÊÇ´íÎóµÄ¡£ÈçÒ»¶¨Òª°ÑÊýÖµ¸³Óèö¾Ù±äÁ¿£¬Ôò±ØÐëÓÃÇ¿ÖÆÀàÐÍת»»¡£
È磺
    a=(enum weekday)2;
ÆäÒâÒåÊǽ«Ë³ÐòºÅΪ2µÄö¾ÙÔªËØ¸³Óèö¾Ù±äÁ¿a£¬Ï൱ÓÚ£º
    a=tue;
»¹Ó¦¸Ã˵Ã÷µÄÊÇö¾ÙÔªËØ²»ÊÇ×Ö·û³£Á¿Ò²²»ÊÇ×Ö·û´®³£Á¿£¬Ê¹ÓÃʱ²»Òª¼Óµ¥¡¢Ë«ÒýºÅ¡£
¡¾Àý11.11¡¿
main(){
    enum body
    { a,b,c,d } month[31],j;
    int i;
    j=a;
    for(i=1;i<=30;i++){
      month[i]=j;
      j++;//VC²»Ö§³Ö×ÔÔöÔËËã
      if (j>d) j=a;


Ïà¹ØÎĵµ£º

C³ÌÐòÓë»ã±à³ÌÐò»ìºÏ±à³Ì


C³ÌÐòÓë»ã±à³ÌÐòÏ໥µ÷ÓùæÔò
ΪÁËʹµ¥¶À±àÒëµÄCÓïÑÔ³ÌÐòºÍ»ã±à³ÌÐòÖ®¼äÄܹ»Ï໥µ÷Ó㬱ØÐëΪ×Ó³ÌÐò¼äµÄµ÷Óùæ
¶¨Ò»¶¨µÄ¹æÔò¡£ATPCS£¬¼´ARM£¬ Thumb¹ý³Ìµ÷Óñê×¼(ARM/Thumb Procedure Call
Standard)£¬ÊÇARM³ÌÐòºÍThumb³ÌÐòÖÐ×Ó³ÌÐòµ÷ÓõĻù±¾¹æÔò£¬Ëü¹æ¶¨ÁËһЩ×Ó³ÌÐò¼äµ÷ÓÃ
µÄ»ù±¾¹æÔò£¬Èç×Ó³ÌÐòµ÷Óùý³ÌÖеļĴæ ......

Linux C ²Î¿¼ÊÖ²á Ö® »·¾³±äÁ¿Æª

getenv£¨È¡µÃ»·¾³±äÁ¿ÄÚÈÝ£©
Ïà¹Øº¯Êý putenv£¬setenv£¬unsetenv
±íÍ·Îļþ #include<stdlib.h>
¶¨Ò庯Êý char * getenv(const char *name);
º¯Êý˵Ã÷ getenv()ÓÃÀ´È¡µÃ²ÎÊýname»·¾³±äÁ¿µÄÄÚÈÝ¡£²ÎÊýnameΪ»·¾³±äÁ¿µÄÃû³Æ£¬Èç¹û¸Ã±äÁ¿´æÔÚÔò»á·µ»ØÖ¸Ïò¸ÃÄÚÈݵÄÖ¸Õë¡£»·¾³±äÁ¿µÄ¸ñʽΪname£½value¡£
·µ»ØÖµ Ö´Ðг ......

C/C++ÖеÄstatic

C++ÖеÄStaticÓÐÁ½¸ö×÷Óá£
1¡¢ ¾²Ì¬¾Ö²¿±äÁ¿ 
   ¾²Ì¬¾Ö²¿±äÁ¿ÔÚº¯ÊýÄÚ¶¨Òå ËüµÄÉú´æÆÚΪÕû¸öÔ´³ÌÐò£¬µ«ÊÇÆä×÷ÓÃÓòÔڸú¯ÊýÄÚ£¬Ö»ÄÜÔÚ¶¨Òå¸Ã±äÁ¿µÄº¯ÊýÄÚʹÓøñäÁ¿¡£ ÔÊÐí¶Ô¹¹ÔìÀྲ̬¾Ö²¿Á¿¸³³õÖµ£¬Èôδ¸³ÒÔ³õÖµ£¬ÔòÓÉϵͳ×Ô¶¯¸³ÒÔ0Öµ¡£ 
void fun1()
{
static int i = 0;
......

[Õª×Ôc#Bible]c#ÖÐnamespaceµÄʹÓã¨ÃüÃû¿Õ¼ä£©

The C# classes that you design will be used by code that you write and possibly by code that
other people write. Your C# classes may be used by a VB.NET application or from within an
ASP.NET page. Moreover, your classes may very well be used alongside other classes
designed by other .NET develope ......

PythonµÄC/C++À©Õ¹

  Python
µÄ
C/C++
À©Õ¹
                         
By phidoit@gmail.com
 
¿ÉÀ©Õ¹ÐÔÊÇ
Python
µÄÒ»´óÌØÉ«£¬Ò»·½Ã棬ÓÉÓÚ
Python
ÊǽâÊÍÖ´Ðеģ¬Õâµ¼ÖÂÔËÐÐËÙ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ