Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÓïÑÔÖÐûÓк¯ÊýÖØÔصĸÅÄ£¡
½ñÌìMSNȺÖÐÓиöÈËÎÊÎÒCÓïÑÔµÄÎÊÌ⣺
     £¨Á½¸öº¯ÊýʵÏֵŦÄÜÏàͬ
       µ«ÊÇËüÃDzÎÊýµÄ¸öÊý²»Í¬
       ÎÒÓÃÒ»¸öº¯Êý°ÑÕâ¸öÁ½¸öº¯Êý·âÆðÀ´
  &n ......

Visual Studio 2005´´½¨C³ÌÐò

ÔÚVisual Studio 2005Öд´½¨C³ÌÐòµÄ·½·¨Îª£º 
      1.  File ->New Project -> Visual C++ -> Win32 -> Win32 Console Application,È»ºóÔÚÏÂÃæµÄNameÀ¸Ð´ÉÏProjectÃû³Æ,LocationÀ¸Ð´ÉÏÎļþµÄ´æ·Å·¾¶,µãOK°´Å¥½øÈëApplication Settings,ÔÚAddtional optionsÖÐÑ ......

¹ØÓÚcÓïÑÔ´´½¨dllÎļþ¼°dllÎļþµÄµ÷ÓÃ

½üÀ´ÓÖÓÐÈËÔÚȺÀïÎÊÈçºÎÓÃcÓïÑÔ±àÖÆdllÎļþ£¨¶¯Ì¬Á´½Ó¿â£©¡£
Ô­À´Ã»ÓжÔÕâ¸öÎÊÌâÌ«ÔÚÒâ¹ý£¬Ò²Ã»Óг¢ÊÔ¹ýÈκνâ¾ö·½°¸£¬±Ï¾¹Ô­À´ÎÒÊÇÓÃvbµÄ£¨ÏÖÔÚÓÃ.net£©£¬×ö¸ödllÖ»²»¹ýÊǵãѡһϽ¨Á¢activeX dll¹¤³ÌµÄͼ±ê¶øÒÑ¡£½ñÌìÔÚÍøÉÏÓëÅóÓÑÁÄÌ죬¿´ÁËËûÖ¸¸øÎҵļ¸¸ö¼¸¸öÎļþ£¬ÓÃMingW½«C³ÌÐò±àÒë³ÉdllÎļþµÄÀý×Ó£¬ÎÒ»ÐÈ»´óÎò£¬Ô­À ......

ubuntuϽâ¾ö C compiler cannot create executables

       ½ñÌ죬ÔÚUbuntuÉÏ°²×°PythonÓöµ½ÁËÎÊÌ⣺ C compiler cannot create executables¡£ÕâÓ¦¸ÃÊDZàÒë»·¾³³öÏÖÁËÎÊÌâ¡£ÔÚÍøÉÏËÑË÷ÁËһϣ¬½â¾ö·½·¨ÈçÏ£º
       sudo apt-get install build-essential¼´¿É¡£
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ