        

  R.1 

   ࠢ筮 㪮⢮ 뢠  ணࠬ஢ ++ 
  ﭨ   1991. ++ -  ணࠬ஢ 饣 祭,
  騩  몥 ணࠬ஢  .

    "The C Programming Language" B. Kernighan, D. Ritchie. Prentice
     Hall, 1978, 1988.
      ᪨ ॢ: " ணࠬ஢ .    "
     . ୨, . , . . "  ⨪". 1984

        ++ ।⠢ , 㭪樨
  ⠭, ॣ㧪 権, ॣ㧪  㭪権, ﭭ
  ⨯, 뫪,  ࠢ ᢮ , ஢
  ࠬ஢ 㭪権  ਢ ⨯.  ७  㬬
   $$R.18.1.   ++  ANSI C++ ਢ  $$R.18.2 .

    American National Standard X3.159-1989. ਪ᪨ 樮
     ⠭.

  ७  ++ ᨨ 1985    ᠭ 㬬 
  $$R.18.1.2. , ⭮騥  蠡 ⨯ ($$R.14) 
  ࠢ ᮡ묨 ﬨ ($$R.15),  ⠬ 㥬
  ७ 몠.

  R.1.1 

   㪮⢮ ᮤন ᫥饥:
  1. .
  2. 襭  ᪨ .
  3. ᭮ .
  4. ⠭ ८ࠧ.
  5. ࠦ.
  6. .
  7. ᠭ.
  8. ⥫.
  9. .
  10. ந .
  11. ஫ 㯠  童.
  12. 樠 㭪樨-童.
  13. ॣ㧪.
  14.  ⨯.
  15. ࠢ ᮡ묨 ﬨ.
  16. ९ୠ ࠡ⪠.
      ਫ A:  ᨭ⠪
      ਫ B: ⨬

  R.1.2  ᨭ⠪

    ᨭ⠪ 몠  ⮬ 㪮⢥ ᨭ⠪᪨ 
   ᨢ,  ࠫ ᫮  ᨬ ⮬ ﭭ
  ਭ. ਠ   ⤥ ப,  ᪫祭
    砥,   ᯨ᮪ ਠ⮢   
  ப  ⪮ " ". 易⥫ ନ 
  ନ ᨬ 砥     "opt",
  ⮬

     { ࠦ opt }

  砥 易⥫쭮 ࠦ, 祭  䨣 ᪮.

  R.2 襭  ᪨ 

  ணࠬ  ++ ⮨    ᪮쪨 䠩 ($$R.3.3).
   ᪮ 窨 ७ 䠩 ࠭᫨  ᪮쪮 室.
   室 ⮨  ९୮ ࠡ⪥ ($$R.16),  ன
  ந室 祭 䠩  ய⠭.  ९
  ࠢ   ,  ப,  ᨬ
   ⫨  ஡  # ($$R2.1).  ࠡ
  ९  ᫥⥫쭮 ᥬ.  ᫥⥫쭮
  ᥬ, .. 䠩 ᫥ ९୮ ࠡ⪨, 뢠
  楩 ࠭樨.

  R.2.1 ᥬ

   ᥬ  : 䨪, 㦥 ᫮,
  ࠫ, 樨  ࠧ ࠧ⥫. ஡, ⨪쭠
   ਧ⠫쭠 ⠡,  ப, ॢ ப  ਨ
  (  "饭" ஡),  㪠 , ,
   ᪫祭 ⮣,   ⤥ ᥬ. 饭 ஡
  㦭, ⮡ ࠧ 騥 冷 䨪, 㦥
  ᫮  ⠭.
     ᫨ 室 ⮪ ࠧ࠭  ᥬ   ᨬ, 
  ᫥饩 ᥬ ⠥ ᥬ  ᨬ쭮  ,
   稭  ⮣ ᨬ.

  R.2.2

  ਨ
   /* 稭 ਩,  蠥 ᨬ */.
   ਨ    묨.  // 稭
  ਩,  蠥 殬 ⮩ ப.  //,
  /*  */   ᯥ樠쭮 祭  ਨ // 
  ᬠਢ   ᨬ. 筮 ᨬ //  /*
    ᯥ樠쭮 祭   /*.

  R.2.3 䨪

  䨪 -  ᫥⥫쭮 㪢   ந쭮 .
   ᨬ   㪢, ᨬ ન _ ⠥
  㪢. ய   㪢 ࠧ.  ᨬ
  ⢥.

  R.2.4 㦥 ᫮

  ᫥  䨪 䨪  㦥 ᫮ 
   㣮 ᫥   ᯮ짮:

   asm        continue     float    new          signed      try
   auto       default      for      operator     sizeof      typedef
   break      delete       friend   private      static      union
   case       do           goto     protected    struct      unsigned
   catch      double       if       public       switch      virtual
   char       else         inline   register     template    void
   class      enum         int      return       this        volatile
   const      extern       long     short        throw       while

     ⮬ 䨪, ᮤঠ騥  ન
  (__) १ࢨ  ॠ権 ++  ⠭ ⥪ 
  짮⥫   㯮ॡ .
      ।⠢ ணࠬ  ++  ஢ ASCII ᯮ
   ⢥ 権  ࠧ⥫ ᫥騥 ᨬ:

    !  %  ^  &   *  (  )  -  +  =  {  }  |  ~
    [  ]  \  ;   '  :  "  <  >  ?   , .  /

   ᫥騥 樨 ᨬ ᯮ   権:

    ->  ++  --  .*  ->*  <<  >>   <=  >=  ==  !=  &&
    ||  *=  /=  %=  +=   -=  <<=  >>= &=  ^=  |=  ::

    ⠥ ⤥쭮 ᥬ.
        ⮬ ᫥騥 ᨬ १ࢨ  ९:

     #  ##

    ।, 騥  ॠ樨, ᢮⢠, ⠪ 
  ⨯ 樨 sizeof ($$R5.3.2)    ⨯
  ($$R.3.6.1) ।  ⠭  䠩
  ($$R.16.4)

        <float.h>   <limits.h>  <stddef.h>

   䠩   ANSI ⠭  . ஬ ⮣
   䠩

        <new.h>    <stdarg.h>   <stdlib.h>

  । ⨯ ᠬ   㭪権.  ᫥
  䠩 室  ANSI ⠭  , 䠩 <new.h> ⭮ ⮫쪮
   ++.

  R.2.5 ࠫ

   ᪮쪮  ࠫ ( 뢠 "⠭⠬").
      ࠫ:
                楫 ⠭
                ᨬ쭠 ⠭
                ⠭  饩 窮
                ப ࠫ

  R.2.5.1  ⠭

   楫 ⠭, 騥  ᫥⥫쭮 , 
  묨 (᭮ ᫥ ), ᫨ ⮫쪮   稭
   0 ( ). ᫥⥫쭮 , 稭  0,
  ⠥ 쬥 楫 (᭮ ᫥ ᥬ).  8  9
    쬥묨. ᫥⥫쭮 , 稭 
  0x  0X, ⠥ ⭠ 楫 (᭮ ᫥
  ⭠). ⠭     ᨬ
   a  A  f  F  묨 祭ﬨ    
  ⭠. ਬ, ᫮     12,
  014  0XC.
        楫 ⠭ ।  ।⠢, 祭 
  砭. ᫨  筠    砭,  ⨯ 㤥
   室騬   祭  ᫥ ⨯: int, long int,
  unsigned long int. ᫨  쬥筠  ⭠筠 
    砭,  ⨯ 㤥  室騬   祭
   ᫥: int, unsigned int, long int, unsigned long int.
  ᫨  稢 ᨬ u  U,  ⨯ 㤥  室騬
    祭  ᫥: unsigned int, unsigned long int. ᫨
   稢 ᨬ l  L,  ⨯ 㤥  室騬
    祭  ᫥: long int, unsigned long int. ᫨
   稢  ul, lu, uL, Lu, Ul, lU, UL  LU,  ⨯
  㤥 unsigned long int.

  R.2.5.2  ⠭

  쭮 ⠭⮩    ᪮쪮 ᨬ, 祭
    窨, ਬ 'x'. ⠭   ᨬ 
  ⨯ char. 祭 ⠭   ᨬ  浪 
  ᨬ  ⠡ ஢ ᨬ   設. 
  ⠭  ᪮쪨 ᨬ  ⨯ int. 祭 ⠪
  ⠭   ॠ樨.
       ᨬ,  騥 ᪮ ।⠢, 
  筠 窠 ', 窠 ",   ?, ⭠
  ஡  \,  ।⠢ 樥 ᨬ (稭饩
   \)  ᮮ⢥⢨  ਢ  ⠡楩:

        ப                  NL (LF)  \n
       ਧ⠫쭠 ⠡      HT       \t
       ⨪쭠 ⠡        VT       \v
       蠣                      BS       \b
        ⪨               CR       \r
       ॢ ଠ (ॣ) FF       \f
       ᨣ                        BEL      \a
       ⭠ ஡         \        \\
                          ?        \?
       筠 窠             '        \'
        窠               "        \"
       쬥筮 ᫮            ooo      \ooo
       ⭠筮 ᫮       hhh      \xhhh

  ᫨  ⭮ ஡ ⮩ ᫥ ᨬ, ⫨ 
  ᫥, १ ।.
   \ooo ⮨  ⭮ ஡ ,  ன
  ᫥ ,    쬥 . ⠥,  
  । 祭 ᪮ ᨬ.  \xhhh ⮨ 
   ⭮ ஡ ,  ன ᫥ x,   ,  ᢮
  ।, ᫥ ᫥⥫쭮 ⭠ .
  ⠥,    祭 ᪮ ᨬ.  ࠭祭
     ⮩  ᫥⥫쭮 ⭠ .
  ᫥⥫쭮 쬥  ⭠ 
  稢,  砥  ᨬ,   
  쬥筠  ⭠筠  ᮮ⢥⢥. ᫨
  祭 ᨬ쭮 ⠭ ॢ室 ᨬ쭮  char,
    । ॠ樥.
      쭠 ⠭, ன ।⢥ ।
  㪢 L,  ப ᨬ쭮 ⠭⮩, ਬ, L'ab'.
   ⠭  ⨯ wchar_t, 騩 楫᫥ ⨯
  ($$R.3.6.1), ।  ⠭⭮ 筮 䠩
  <stddef.h>. ப ᨬ ।祭  ⠪ 
  ᨬ,  祭 ᨬ  頥   .

  R.2.5.3 ⠭  饩 窮

  ⠭  饩 窮   楫 , ᨬ
  窠, ஡ , e  E, 楫 ⥫  
     砭, 㪠뢠騬 ⨯.   ஡
     ᫥⥫쭮  (᭮
  ᫥ ) .  楫 ,  ஡ 
  (  )  ⢮.  窠,  ᨬ e ( E)
    ⥫  ⢮ (  ). 
  ⠭  饩 窮  double, ᫨ ⮫쪮  
      砭. 砭 f  F  ⨯
  float, 砭 l  L  ⨯ long double.

  R.2.5.4 ப ࠫ

  ப ࠫ  ᫥⥫쭮 ᨬ  (  ।
   $$R.2.5.2), 祭   窨, .. "...". ப
   ⨯ "ᨢ ᨬ"    static ($$R.3.5), 
  樠 묨 ᨬ.    ப ࠧ
  (.. ࠭  ⤥ ꥪ), । ॠ樥.
      ᥤ ப ࠫ ⥭.   ப,
  祭  ⥭樨, ࠭ ⤥쭮. ਬ, ᫥
  ⥭樨

      "\xA"  "B"

  ப 㤥 ᮤঠ  ᨬ '\xA'  'B' (  
  ⭠ ᨬ '\xAB').
       ᫥  室 ⥭権  ப 
  ᨬ '\0', ⮡ ணࠬ,  ப,  ।
   .  ப ࠢ    ᨬ, 
  ᨬ ⥫ ப.  ப । ᨬ 
  窨 "   ᨬ \.
      ப ࠫ, । ன ।⢥  ᨬ L,
  ⠥ பᨬ쭮 ப, ਬ, L"asdf". 
  ப  ⨯ "ᨢ ⮢ ⨯ wchar_t",  wchar_t
  楫᫥ ⨯, ।  ⠭⭮ 筮 䠩
  <stddef.h>.  ⥭樨   பᨬ
  ப ࠫ ।.

  R.3 ᭮ 

   砥 ꥪ, 㭪, ⢮ 㭪権, 
  ᫥, ⨯, 童 , 蠡 ⨯, 祭  .
   ⠭ ⭮  ணࠬ   ᠭ.  
  ᯮ짮 ⮫쪮  ।  ணࠬ, 뢠 
   .   ⨯,    ᯮ짮.
  , ᯮ㥬   祬   ࠭樨, 
       (   ࠧ) ꥪ, 㭪, ⨯,
  蠡 ⨯  祭,  ᨬ   ($$R.3.3)
    ࠭樨.
      ꥪ     ࠭ ($$R.3.7). 
  ꥪ    ($$R.3.5),  ।  ६
  .  祭, ࠭  ꥪ, ।
  ⨯ ࠦ, 饣   ꥪ.

  R.3.1 ᠭ  ।

  ᠭ ($$r.7)    ணࠬ   ᪮쪮
  . ᠭ ⠥ ।, ᫨ ⮫쪮   뢠
  㭪    ⥫ ($$R.8.3),  ᮤন ⥫
  extern ($$R.7.11),    樠樨  ⥫ 㭪樨,
    ᠭ ᪮ 童   ᠭ 
  ($$R.9.4),   ᠭ   ($$R.9.1),  
  ᠭ typedef ($$R.7.1.3).  ਢ ਬ ।:

       int a;
       extern const c = 1;
       int f(int x) { return x+a; }
       struct S { int a; int b; };
       enum { up, down };

  ⮣   ᫥ ⮫쪮 ᠭ:

       extern int a;
       extern const c;
       int f(int);
       struct S;
       typedef int Int;

       ꥪ, 㭪樨,    ᫥,
  ᯮ㥬  ணࠬ,   ⮫쪮  ।
  ($$R.3.3). ᫨ 㭪   뢠    
   ᯮ,   㦭 ।. 筮, ᫨  
  ᯮ ⮫쪮 ⠪,   ॡ  । ,
   ⠪    ।.

  R.3.2  

     : 쭠, 㭪, 䠩  .
      쭠: , ᠭ   ($$R.6.3),  
       ⮬    ᯮ짮 ⮫쪮     ,
      ᮤঠ  ⮬    ᫥  ᠭ.
       ଠ ࠬ஢ ᬠਢ,  ᫨   뫨
      ᠭ  ᠬ ꥬ饬  ⮩ 㭪樨.
      㭪: ⪨ ($$R.6.1)  ᯮ짮   㭪樨,
       ன  ᠭ. 쪮 ⪨   ,
      ᮢ  㭪樥.
      :  ᠭ    ($$R.6.3)  ᮢ ($$R.9)
         䠩    ᯮ짮  
      ࠭樨,  ன   ᫥  ᠭ. ,
      ᠭ  䠩  , 뢠 묨.
      :  童     ᢮  
         ᯮ짮 ⮫쪮  㭪樨-童 ⮣ 
      ($$R.9.3),  ᫥ 樨 . , ਬ塞  ꥪ 
       ($$R.5.2.4)  ꥪ ந  ($$R.10),
       ᫥ 樨 ->, ਬ塞  㪠⥫  ꥪ 
       ($$R.5.2.4)   ꥪ ந ,  ᫥
      樨 ࠧ襭 :: ($$R.5.1), ਬ   
       ந . ,    樨
     friend ($$R.11.4), ਭ ⮩   ।,
       , ᮤঠ騩 ᠭ friend. , 
     ᠭ   return   ⨯ ࠬ, ਭ
      쭮  .
  樠 ᮣ襭   ,   ᠭ
  ࠬ஢ 㭪樨 ($$R.8.2.5)   ᠭ friend ($$R.11.4).
            ᠭ ⮣    ꥬ饬
    . ⮥  童  -⠪ 
  ᯮ짮, ᫨  ।  ,  ஬
  ਬ  :: ($$R.4.1, $$R.9.4, $$R.10). ⮥  ꥪ,
  㭪樨, ⨯   ᫥  䠩  
   ᯮ짮, ᫨  । 㭠୮ 樥 ::
  ($$R.5.1).    ⮬,   ($$R.9.1)  
    ꥪ, 㭪樨   ᫥, 饣
     . ᫨   ꥪ,  㭪, 
   ᫥ ᠭ (  浪)   
     ,    ⠭ . 
  , ⮥  쭮     
     ꥪ, 㭪樨   ᫥,
  -⠪  ᯮ짮, ᫨ ।  室饩
  ᯥ䨪樥 class, struct  union ($$R.7.1.6). 筮,
  ⮥   ᫥  ᯮ짮, ᫨
  ।  ᯥ䨪樥 ⨯ enum ($$R.7.1.6).  $$R.10.4
  ਢ ᢮ ࠢ  .
  ⮬ ᠭ  ⠥  襭 ⥫ 
  ($$R.8), ।饩  樠樨 (᫨  ).
  ਬ,

      int x = 12;
      { int x = x; }

   ஥ x 樠 ᢮ ᮡ⢥ (।)
  祭.
     ⮬ ᠭ  ᫥ ⠥  ࠧ
  ᫥   䨪, ਬ:

      enum { x = x };

    ᫥ x  樠 ᢮ ᮡ⢥
  (।) 祭.

  R.3.3 ணࠬ  뢠

  ணࠬ ⮨    ᪮쪨 䠩, 뢠 
  ($$R.2).  ⮨  ᫥⥫쭮 ᠭ.
        䠩  , ஥  ᠭ 
  static,    ᢮  ࠭樨  
  ᯮ짮   ꥪ⮢, 㭪権  ..  㣨
   ࠭樨. ,  ⠪   ७
  뢠.   䠩  , ஥  ᠭ
   ᯥ䨪樥 inline,    ᢮ 
  ࠭樨.   䠩  , ஥  ᠭ
   ᯥ䨪樥 const   ᠭ   extern, ⠥
    ᢮  ࠭樨.   ୮   ,
  ஥  ᯮ짮     
  ࠭樨 ᠭ ꥪ, 㭪樨   ,   
   ᪨ 童 ($$R.9.4),   㭪権-童, ஬
  ⠭ ($$R.9.3.2). 类 ᠭ ண  
  䠩  , ஥  ᠭ   ᫥
  ᯮᮡ ⠪, ⮡  ७ 뢠,  䠩
  ணࠬ 砥     ꥪ ($$R.3.7), 㭪
  ($$R.8.2.5)   ($$R.9).   뢠 譨 
  ,    譥 뢠.  ⭮, ᪮
       static, 类 㯮ॡ 
  ண   䠩  ,  ()
  ᯮ짮  ᠭ ꥪ  㭪樨  譨 뢠,
      ᪨ 童  㭪-童,
    ⠭, 㤥      .
      ।塞 ⨯ (typedef $$R.7.13),  ᫥
  ($$R.7.2)   蠡 ⨯ ($$R.14)   譥
  뢠.
     ᪨ 童  ($$R.9.4) ᪠ 譥 뢠.
     㭪樨-童,  騥 ⠭, ᪠ 譥
  뢠. 㭪樨-童, 騥 ⠭,  
   筮  ।  ணࠬ.
       ($$R.3.2),  ᠭ  ᯥ䨪樥
  extern,  譥 뢠, ᫨ ⮫쪮  㦥  뫨
  ᠭ  static ($$R.7.1.1).
     , ᯮ㥬   ᠭ ண 譥 ,
   ᮢ,  ᪫祭 ᯮ짮  ।塞
  ⨯ ($$R.7.1.3)  㪠 ࠭ ᨢ ($$R.8.2.4).
     筮  ।   㭪樨, ꥪ,
     ᫥, ᯮ㥬  ணࠬ. ,
  ᫨ 㭪   뢠      ᯮ,
    㦭 ।. 筮, ᫨   ᯮ
  ⮫쪮 ⠪ ࠧ,   ॡ  । ,
     㦭 ।.
       㭪樨   ⮫쪮 䠩  .
       ᯥ䨪樨 뢠   뢠 
  ᠭﬨ  㣮 몥 ($$R.7.4).

  R.3.4 砫  砭 ணࠬ

  ணࠬ  ᮤঠ 㭪   main().  ਯ뢠
  ஫ 砫 ணࠬ.  㭪   ।।
   ࠭,     ॣ㦥,   ⨯ 
   ॠ樨. ।,   ॠ 
  ᪠  ਢ  ।    
  ᫥ argv  ࠬ. 㭪 main  । ⠪

     int main() { /* ... */ }

  

     int main(int argc, char* argv[]) { /* ... */ }

   ᫥ । argc  ᫮ ࠬ஢, ।
  ணࠬ 㦥,  ஬  믮. ᫨ argc 
  ࠢ , ࠬ  ।  ப, 騥
  ᨬ '\0',   argv[0]  argv[argc-1], 祬
  argv[0]   ,   ணࠬ 뫠 饭,
   "".  ࠭஢,  argv[argc]==0.
      㭪 main()   뢠  ணࠬ. 뢠
  main() ($$R.3.3)   ॠ樨.   
  main()   ᫥ 뢠   inline  static.
  맮 㭪樨

      void exit(int);

  ᠭ  <stdlib.h>, 蠥 ணࠬ. 祭 ࠬ
  । 㦥 ணࠬ  ⢥ १ ணࠬ.
      樠  ᪨ ꥪ⮢ ($$R.3.5)
   ࠭樨 ந室 ० ࢮ 饭  㭪樨
   ꥪ, ।  ⮩  ࠭樨. 
  樠 ($$R.8.4, $$R.9.4, &&R.12.1, $$R.12.6.1) 
   ஢ । 믮 ࢮ  main() 
  ⫮   , ।饣 ࢮ ᯮ짮
  㭪樨  ꥪ, ।    ࠭樨.
   ᪨ ꥪ  㬮砭 樠 㫥 ($$R.8.4)
  ०  ᪮ ( ६ 믮 ணࠬ)
  樠樨.   ॡ  冷 樠樨
  ꥪ⮢  ࠧ  ࠭樨  . 樠
    ᪨ ꥪ⮢ ᠭ  $$R.8.4.
        ($$R.12.4)  樠஢ ᪨
  ꥪ⮢ 뢠    main()   맮 exit().
  ⮦ ந室  ⭮ 浪  ࠢ 
  樠樥.   㭪樨 atexit()  <stdlib.h> 
  㪠 㭪,  㦭 뢠  室  ணࠬ.
  ᫨ 뫮 饭  㭪樨 atexit(), ꥪ, 樠஢
   맮 atexit(),   㭨⮦   ,  
  ந 맮 㭪樨, 㪠  atexit(). ᫨ ॠ ++
    ॠ樥 ,  ⢨,   뫨
  ந ᫥ 맮 㭪樨,   atexit(), ந室
  ⮫쪮 ᫥ 맮  ஢.
      맮 㭪樨

      void abort();

  ᠭ  <stdlib.h>, 蠥 ணࠬ  믮
  ஢ ᪨ ꥪ⮢   맮 㭪権, 
   atexit().

  R.3.5  

    뢠  : ⮬᪨  ᪨.
     ⮬᪨ ꥪ ⠭ 묨  ।
  ࠢ   .
     ᪨ ꥪ   ࠭ ᢮ 祭  
  ६ 믮 ணࠬ.
     ⮬᪨ ꥪ 樠 ($$R.12.1) 直 ࠧ,
   ࠢ 室  ,   ।  㭨⮦
  ($$R.12.4)  室  ⮣  ($$R.6.7).
      ⮬᪨ ꥪ    㭨⮦
   砭  , 筮 ⠪ ,     ᪫祭
   ⮬᪨ ꥪ , 饣 
      䥪⮬,  ᫨ ,  
  ꥪ  ᯮ.
     筮,  ꥪ   ஬ 
  ஬, 騬  䥪,    ᪫祭,
   ᫨ ,    ᯮ.
    ᪨ ꥪ 樠  㭨⮦ 
  ᮮ⢥⢨  ᠭ  $$R.3.4  $$R.6.7.  묨 ꥪ⠬
   易  , . $$R.5.3.3  $$R.12.2.  
  ꥪ    ᪨.  ꥪ⠬  童
    ।   ᪨   
  ᯮ짮 ᯥ䨪樨   static ($$R.7.1.1).

  R.3.6 

     ⨯: ᭮  ந.

  R.3.6.1 ᭮ ⨯

   ᪮쪮 ᭮ ⨯.  ⠭⭮ 筮
  䠩 <limits.h>   ᨬ  ॠ樨  
  ᨬ 祭  ⨯.
     ꥪ, ᠭ  ᨬ (char),  ࠭ 
      ᨬ  設. ᫨ ᨬ
  ⮣  ࠭  ᨬ쭮 ६,   祭
  ࠢ 楫 祭  ⮣ ᨬ.   
  뢠  unsigned  signed.  char, signed char 
  unsigned char  ६ ࠧ묨 ⨯.   
   ⨯ ॡ  ꥬ .
       ᠭ short int, int  long int  ।
  楫  ࠧ ࠧ஢.   楫 ॡ 
    祬  ⪨ 楫,   ॠ樨  ⪨
  楫,   楫,     㣨  
  묨  楫.  楫  ࠧ,
  ।塞 ⥬ , ࠧ 㣨 楫 ।
  묨 ॡﬨ.
        ⨯ signed char, short, int  long 
  ᮮ⢥騩  ⨯,     ꥬ
    㤮⢮ ⥬  ॡ ࠢ.
  ॡ ࠢ -  ࠭祭  祭 㪠⥫
    ꥪ, ஥ 뢠 ॠ ($$R.5.4).
      楫, ᠭ  unsigned, 稭 
  䬥⨪   2@n,  n ᫮ ⮢, ᯮ㥬 
  ।⠢ 祭.  ᫥,   䬥⨪ 
    ९.
      ⨯  饩 窮: float, double  long double.
   double ࠭   筮 ।⠢, 祬
  float,  ⨯ long double ࠭ 筮  , 祬 
  double. ࠪ⨪ ᭮ ⨯  饩 窮 ।
   ᮮ⢥⢨  ॠ樥  ⠭⭮ 筮 䠩
  <float.h>.
       char, int  ࠧ஢  ⨯ ᫥ ($$R.7.2)
  뢠 楫᫥묨 ⨯. ᫥ ⨯  
  ⨯  饩 窮 ࠧ 䬥᪨ ⨯.
      void  ⮥ ⢮ 祭.  ᯮ 
  祭 ⨯ 㭪権,    १. 
  뢠 ꥪ  ⨯ void.  ࠦ  
  ८ࠧ  ⨯ void ($$R.5.4), 稢襥 ࠦ 
  ᯮ짮 ⮫쪮  ࠦ- ($$R.6.2), 
   ࠭ 樨  ($$R.5.18)   ⢥ ண 
  쥣 ࠭  樨 ?: ($$R.5.16).

  R.3.6.2 ந ⨯

   ⥭樠쭮 ᪮筮 ᫮ ந ⨯, 
    ᭮ ⨯ ᫥騬 ᯮᮡ:
      ᨢ ꥪ⮢  ⨯, $$R.8.4;
      㭪樨, 騥 ࠬ  ⨯  騥 ꥪ
       ⨯, $$R.8.2.5;
      㪠⥫  ꥪ  㭪樨  ⨯, $$R.8.2.1;
      뫪  ꥪ  㭪樨  ⨯, $$R.8.2.2;
      ⠭, 騥 祭ﬨ  ⨯, $$R.7.1.6;
      , ᮤঠ騥 ᮢ㯭 ꥪ⮢ ࠧ ⨯ ($$R.9),
       㭪権  ࠢ ⨬ ꥪ⠬ ($$R.9.3) 
       ᯨ᮪ ࠭祭    ⨬ ꥪ⠬  㭪, $$R.11;
      ,   ᠬ  ⠭ ࠭祭
       , $$r.11;
      ꥤ,   ࠬ, ᯮᮡ묨 ᮤঠ
       ࠧ ६ ꥪ ࠧ ⨯, $$R.9.5;
      㪠⥫  童 ᮢ,   童  ⨯
      ।  ꥪ⮢  , $$R.8.2.3.
   饬 砥 㪠 ⮤ ஥ ꥪ⮢  ਬ
  ४ᨢ, ࠭祭 ਢ  $$r.8.2.1, $$R.8.2.4, $$R.8.2.5
   $$R.8.2.2.
     㪠⥫  ꥪ ⨯ T  "㪠⥫   T". ਬ,
   㪠⥫  ꥪ ⨯ int  "㪠⥫  int", 
  㪠⥫  ꥪ  X 뢠 "㪠⥫  X".
    ꥪ ⨯ void* (㪠⥫  void), const void* 
  volatile void*  ᯮ짮  㪠⥫  ꥪ
  ⭮ ⨯. ꥪ ⨯ void*   筮 ,
  ⮡ ࠭ 㪠⥫   ꥪ.
     ࠣ 㪮⢠, 騥  "㪠⥫",  ⭮
   㪠⥫  童,  ᪫祭 㪠⥫  ᪨
  童.

  R.3.6.3  ⨯

  ᭮  ந ⨯     堭
  typedef ($$R.7.1.3),  ᥬ⢮ ⨯  㭪権   
     堭 蠡 ⨯ ($$R.14).

  R.3.7 

   ꥪ -    ,  - ࠦ,
  뫠饥  ꥪ  㭪. 祢 ਬ஬  㤥
   ꥪ.  樨, ஦騥 , ਬ,
  ᫨ E ࠦ ⨯ 㪠⥫,  *E - ᭮ ࠦ,
  ᮮ⢥饥 ꥪ,   㪠뢠 E. ନ ""
  ("lvalue" .. left value -  稭)   
  ᢠ E1 = E2,   ࠭ E1  "ᮢ"
  塞 ६.  㦤  権  $$R.5 㪠뢠
  ਬ     ࠭  ஦   ᠬ .
    , ᫨     㭪樨,
   ᨢ  const.

  R.4 ⠭ ८ࠧ

   樨  ᨬ  ᢮ ࠭  맢
  ८ࠧ 祭 ࠭   ⨯  㣮. 
  뢠 ८ࠧ, 맢 ᠬ묨 묨 ﬨ,
       १ ⠪ ८ࠧ.
       ⥫ ᭥ 
  㦤  樨.  ८ࠧ ⠪ ந室
   樠樨 ($$R.8.4, $$R.8.4.3, $$R.12.8, $$R.12.1).
   $$R.12.3   $$R.13.2 뢠 ८ࠧ, 
  짮⥫,   ᮮ⭮襭  ⠭묨 ८ࠧﬨ.
   १ ८ࠧ   , ⮫쪮 ᫨
  १  뫪 ($$R.8.2.2).

  R.4.1 ⠭ ८ࠧ  楫᫥

  ,  ॡ 楫,  ᯮ짮 char, short int,
   ᫥ ($$R.7.2)  ⮢  ($$R.9.6), 祬
      ਠ. ᫨ int  ।⠢
   祭 室 ⨯, 祭 ८ࠧ  int, 
   ८ࠧ  unsigned int.  뢠 ⠭
  ८ࠧ  楫᫥.

  R.4.2 ८ࠧ 楫᫥

  ᫨ 楫 ८ࠧ   ⨯,  祭 祭
   襥  楫, ᮢ饥  楫  
   (mod 2**n),  n  ᫮ ⮢  ।⠢ 
  楫.  ।⠢  ⥫쭮   ८ࠧ
   楯㠫쭮,    筮 ।⠢
   ⢨⥫쭮  ந室.\
      ᫨ 楫 ८ࠧ   ⨯, 祭  ,
   ᫮,    ।⠢    ⨯,
   祭 । ॠ樥.

  R.4.3 祭  饩 窮   筮

   ࠦ ⨯ float  ᯮ짮 䬥⨪  筮
  筮. ᫨ 祭  饩 窮 襩 筮
  ८ࠧ  祭 ⨯ float ࠢ  襩 筮,
    祭  ந室. ᫨ 祭  饩
  窮 襩 筮 ८ࠧ  祭 ⨯ float
  襩 筮  祭 室  ।, 
  ।⠢ ⨯,   १   
  襥 襥  襥 襥 ।⠢ 祭.
  ᫨ १   ࠭ ।⠢ ⨯, 
  ।.

  R.4.4 ᫥  ᫠  饩 窮

  ८ࠧ 祭  饩 窮  楫᫥ ⨯
  ᢮  "祭", .. 뢠 ஡ . 
  ८ࠧ   設,  ⭮   ஭ 㤥
  室 祭  ⥫ ᥫ ।  ࠧ
  設  ࠧ.  ⠥ ।, ᫨
  祭  ।⠢  楫᫥ ⨯.
      ८ࠧ 楫᫥ 祭  祭  饩
  窮 ⥬᪨ ४ ⮫쪮, ᪮쪮  
  ⥬ .  ந  筮, ᫨ 楫᫥
  祭  筮 ।⠢  祭  饩 窮.


    R.4.5 䬥᪨ ८ࠧ

   設⢠ 権 ८ࠧ ࠭  ⨯ १
  ।    ⥬  ࠢ.  ࠢ  
  "묨 䬥᪨ ८ࠧﬨ".
     ᫨   ࠭  long double, 㣮 ࠭
     ८ࠧ  long double.
     , ᫨   ࠭  double, 㣮 ࠭
     ८ࠧ  double.
     , ᫨   ࠭  float, 㣮 ࠭
     ८ࠧ  float.
     , ᫨ ⠭ 楫᫥ ८ࠧ ($$R.4.1)
     ந室   ࠭.
     , ᫨   ࠭  unsigned long, 㣮
     ࠭ ८ࠧ  unsigned long.
     , ᫨   ࠭  long int,  㣮 -
     unsigned int,   ᫮,  long int  ।⠢
       祭 unsigned int, 祭 unsigned int
     ८ࠧ  long int,  ⨢ 砥  ࠭
     ८ࠧ  unsigned long int.
     , ᫨   ࠭  long, 㣮 ࠭
     ८ࠧ  long.
     , ᫨   ࠭  unsigned, 㣮 ࠭
     ८ࠧ  unsigned.
     ,  ࠭   int.

  R.4.6 ८ࠧ 㪠⥫

  ,  㪠⥫ ($$R.8.2.1) ᢠ, 樠,
  ࠢ  ᯮ  ࠧ,  ந室
  ᫥騥 ८ࠧ:
     ⠭⭮ ࠦ ($$R.5.19), ஥ ᢮  ,
     ८ࠧ  㪠⥫, 筮 뢠  㪠⥫.
     ࠭,  祭 ⠪ 㪠⥫ 㤥 ⫨筮 
      㪠⥫  ꥪ  㭪.
     ⥫  ꥪ  ⨯,  饣 const 
     volatile,  ८ࠧ  void*.
     ⥫  㭪  ८ࠧ  void*,  ᫮,
       void* ⢮ 筮 , ⮡ ࠭ 
     㪠⥫.
     ⥫     ८ࠧ  㪠⥫ 
     㯭     ($$R.10), ᫨ ⠪
     ८ࠧ  ᮤন ᫥ ($$R.10.1). 
      ⠥ 㯭, ᫨ 㯭  騥 童 ($$R.11.1).
     ⮬ ८ࠧ 㤥 㪠⥫  ꥪ ⨯ 
     ,   ꥪ ⨯ ந . ⮩ 㪠⥫
     (0) ८ࠧ ᠬ  ᥡ.
     ࠦ ⨯ "ᨢ T"  ८ࠧ뢠  㪠⥫
      砫  ᨢ.
     ࠦ ⨯ "㭪,  T" ८ࠧ  "㪠⥫
      㭪,  T",  ᪫祭  砥, 
      ᯮ  ࠭ ᭮ 樨 &  樨
     맮 㭪樨 ().

  R.4.7 ८ࠧ 뫮

  ,  뫪 ($$R.8.2.2) 樠 ( ।
  ࠬ஢ ($$R.5.2.2)   祭 㭪樨 ($$R.6.6.3)) 
  ᯮ  ࠧ,  ᫥騥 ८ࠧ:
     뫪      ८ࠧ  뫪  㯭
       ($$R.10, $$R.11.1)   ($$R.8.4.3),
      ᫮,  ⠪ ८ࠧ  ᮤন ᫥
     ($$R.10.1.1). ⮬ ८ࠧ 㤥 뫪  ꥪ
      ,   ꥪ ந .

  R.4.8 ⥫  童

  ,  㪠⥫  童 ($$R.8.2.3) 樠,
  ᢠ, ࠢ  ᯮ  ࠧ,
   ந室 ᫥騥 ८ࠧ:
     ⠭⭮ ࠦ ($$R.5.19), ஥ ᢮  ,
     ८ࠧ  㪠⥫  童. ࠭,  
     祭 㤥 ⫨筮   㣨 㪠⥫  童.
     ⥫  童    ८ࠧ 
     㪠⥫  童 ந   ,  ᫮,
      ⨬ ⭮ ८ࠧ  㪠⥫  童 ந
       㪠⥫ 童  ,    믮
      ࠧ ($$R.10.1.1).
     ࠢ ८ࠧ 㪠⥫  童 (..  㪠⥫ 
  童    㪠⥫  童 ந ) 룫廊
  ॢ, ᫨ ࠢ   ࠢ  㪠⥫ 
  ꥪ (..  㪠⥫  ந ꥪ  㪠⥫ 
   ꥪ) ($$R.4.6, $$R.10).  室  ࠭⨨
   ⨯.
     ⬥⨬,  㪠⥫  童   㪠⥫  ꥪ
   㪠⥫  㭪  ࠢ ८ࠧ ⠪ 㪠⥫
   ਬ  㪠⥫  童.  ⭮ 㪠⥫  童
   ८ࠧ  void*.

  R.5 ࠦ

   । ᨭ⠪, 冷 ᫥  祭
  ࠦ. ࠦ -  ᫥⥫쭮 権  ࠭,
    ᫥. ᫥  뤠  ⢥
  १ 祭   뢠  䥪.
     樨   ॣ㦥, ..    ਯᠭ 祭,
    ਬ  ࠦ ⨯  ($$R.9). ਬ
  ॣ㦥 権 ८ࠧ  맮 㭪権  ᮮ⢥⢨
   ᠭ  $$R.13.4. ॣ㦥 樨 稭
  ᨭ⠪᪨ ࠢ, ।  ⮬ ࠧ,  ॡ
   ⨯ ࠭,   浪 ᫥   ࠢ
  맮 㭪樨. ⭮襭  ﬨ, ⨯ ++a 砥
  a+=1,  ࠭  ॣ㦥 権 ($$R.13.4).
      ⮬ ࠧ ᠭ ਬ 権  ⨯,  
     ॣ㦥묨. ॣ㧪 権   
  ࠢ ਬ 権  ⨯,   ⠪ ਬ
  ।ᬮ७  ᠬ 몥.
     冷 ᫥ ࠦ । ਮ⮬  浪
  ਬ 権.  ⥬᪨ ࠢ 樠⨢
   ⨢ 権  ⮫쪮, ᫨ 樨
  ⢨⥫쭮 樠⨢  ⨢.  ᪫祭
  ७ 砥 冷 ᫥ ࠭ ⭮ 樨
  ।.  ⭮, ᫨  ࠦ 祭 
  , १ ࠦ ।, ᫨ ⮫쪮 冷
  믮  ᯥ稢 ᠬ ﬨ, ਬ:

      i = v[i++];  // the value of `i' is undefined
      i=7,i++,i++; // `i' becomes 9

       ९      ᫥ ࠦ
    ॠ樨.  設⢥  ॠ権 ++
   ९ 楫.      
  訡 権  ᫠  饩 窮  
  設  設  筮 易  ᮮ⢥騬 묨
  㭪ﬨ.
     ஬ ७ 砥, ࠭ ⨯ const T, volatile T,
  T&, const T&  volatile T&  ᯮ짮,  ᫨  
   ⨯  T. 筮, ࠭ ⨯ T* const, T*volatile
   ᯮ짮,  ᫨    ⨯  T*, 
  ᪫祭 ७ 砥. 筮,  ⨯ T 
  ᯮ짮 ,  ॡ ⨯ volatile T  const T.
   ࠢ  ਬ  樨, ⠪  const T* volatile
   ᯮ짮 ⠬,  ॡ T*,  ᪫祭 ७
  砥.  ᬮ७ ࠧ襭 ॣ㧪 ($$R.13.2) ⠪
  ᯮ짮 権  ⠥ ⠭ ८ࠧ
  ࠭.
      ᫨ ࠦ  ⨯ "뫪  T" ($$R.8.2.2, $$R.8.4.3),
  祭 ࠦ  ꥪ ⨯ "T",   ஥
  뫪. ࠦ  ᮬ. 뫪  ।⠢ 
   ꥪ.
      ⨬ । 짮⥫ ८ࠧ ꥪ⮢
    ( ⭮) ᭮ ⨯, 㪠⥫  .. ($$R.12.3)
  ᫨  ᫥ ($$R.13.2), ⠪ ८ࠧ 
  ਬ ࠭஬ ᥣ,   ꥪ ⨯ 
   ⢥ ࠭ 樨,  ⢥ 樠饣
  ࠦ ($$R.8.4),  ⢥ ࠦ, 饣 ᫮ ($$R.6.4),
    ⢥ ࠦ, ᯮ㥬   横 ($$R.6.5),
    ⢥ 祭, 頥 㭪樥 ($$R.6.6.3),
    ⢥ ࠬ 㭪樨 ($$R.5.2.2).

  R.5.1 ࢨ ࠦ

  ࢨ묨 ࠦﬨ  ࠫ,   , ।
    樨 ࠧ襭   ::.

       ࢨ筮-ࠦ:
            ࠫ
            this
            :: 䨪
            :: -㭪樨-樨
            :: 筥-
            ( ࠦ )
            

     ࠫ  ࢨ ࠦ.  ⨯ ।
    ($$R.2.5).
      ⥫ ᪮ 㭪樨-童 ($$R.9.3) 㦥 ᫮
  this 砥 㪠⥫  ꥪ,  ஬ ⭮ 맮
  㭪樨. 㦥 ᫮ this  ᯮ짮  ⥫
  㭪樨-童 .
      :: ,  ன ᫥ 䨪 
  -樨-㭪樨  筥-  ࢨ
  ࠦ.  ⨯  ᠭ 䨪, 
   -㭪樨-樨. ⮬  䨪,
    -㭪樨-樨.   ᮬ, ᫨
  䨪  ᮬ. 䨪  -㭪樨-樨
    䠩  .   樨 ::
     ⨯, ꥪ, 㭪樨   ᫥,
   ᫨ 騩  䨪   ($$R.3.2).
     ࠦ  ᪮  ࢨ ࠦ, ⨯  祭
  ண     ࠦ  ᪮. 稥 ᪮
     ,  ࠦ ᮬ  .
     ⨥  -  । ࢨ筮-ࠦ, ஥
    ⮫쪮 ᫥ .  -> ($$R.5.2.4):

       :
          䨪
          -㭪樨-樨
          -㭪樨-८ࠧ
          ~-
          筥-

    䨪  ,  ᫮   ᠭ 騬 ࠧ
  ($$R.7). ⨥ -㭪樨-樨 ᠭ  ($$R.13.4), 
  ⨥ -㭪樨-८ࠧ  ($$R.12.3.2). 
  ~- 砥  ($$R.12.4).

         筥-:
                  饥-- :: 

  ⨥ 饥--,   ᫥ ::   童
  ⮣  ($$R.9.2),  童   ⭮襭  
   ($$R.10)  筥-.  ⨯ 
  ⨯ 童,  १ ࠦ   童.  
  ᮬ, ᫨ ⠪  童.     
  㣨  ( ⨯),  ⠪ 砥  ࠢ  
  㯭    ᯮ짮. ᫨ ᯮ
  -::-  -::~-,  
  -       .   ⠪
     ($$R.12.1)   ($$R.12.4)
  ᮮ⢥⢥.  ᯮ짮 騥 
  ⭮, ਬ, N1::N2::N3::n, ⮡  
  ⨯ ($$R.9.7).

  R.5.2 䨪 ࠦ

     䨪 ࠦ ਬ ᫥ ࠢ.
        䨪᭮-ࠦ:
               ࢨ筮-ࠦ
               䨪᭮-ࠦ [ ࠦ ]
               䨪᭮-ࠦ ( ᯨ᮪-ࠦ opt )
               -⮣-⨯     ( ᯨ᮪-ࠦ opt )
               䨪᭮-ࠦ .  
               䨪᭮-ࠦ -> 
               䨪᭮-ࠦ ++
               䨪᭮-ࠦ --
        ᯨ᮪-ࠦ:
              ࠦ-ᢠ
              ᯨ᮪-ࠦ , ࠦ-ᢠ

  R.5.2.1 

  䨪᭮ ࠦ,   ᫥ ࠦ  
  ᪮,  䨪 ࠦ. ⨢  
  ஢. ࢮ  ࠦ   ⨯ "㪠⥫  T",
   ஥  楫᫥ ⨯.  १  "T". ࠦ
  E1[E2] ᮢ ( ।)  ࠦ *((E1) + (E2)).
  ஡ 権 *  +   $$R.5.3   $$R.5.7,  ᨢ
  㦤  $$R.8.2.4.

  R.5.2.2 맮 㭪樨

  맮 㭪樨  䨪 ࠦ,   ᫥,
   ⮩, ᯨ᮪ ࠦ  ᪮, ࠧ ⮩.
   ࠦ ࠧ 䠪᪨ ࠬ 㭪樨. 䨪᭮
  ࠦ   ⨯ "㭪,  T", "㪠⥫ 
  㭪,  T"  "뫪  㭪,  T",
   १ 樨 맮  ⨯ "T".
       맮 㭪樨 ந室 樠  ଠ쭮
  ࠬ ($$R.8.4.3, $$R.12.8, $$r.12.1) 䠪᪨ ࠬ஬.
  ந ⠭ ($$R.4)   짮⥫ ($$R.12.3)
  ८ࠧ ⨯.  㭪樨   祭 ﭭ
  ଠ ࠬ஢,        祭
  䠪᪨ ࠬ஢, ஬ ⮣ ,  ଠ ࠬ
   ⨯ 뫪  ᯥ䨪樨 const ($$R.8.2.2). ᫨ ଠ
  ࠬ  ⨯ 뫪  室  ᮧ
  ६ ६ ($$R.7.1.6, $$R.2.5,$$R.2.5.4,$$R.8.2.4,
  $$R.12.2). ,    ﭭ ꥪ⮢ 
   ࠬ஢-㪠⥫.
     㭪   ⠪ ࠧ,   ᬮ ᯮ짮
  襥 ᫮ ࠬ஢ (। ࠬ  㬮砭 $$R.8.2.6)
   襥 ᫮ ࠬ஢ (   ... $$R.8.2.5),
  祬 뫮 㪠  । 㭪樨 ($$R.8.3).
     㭪  맢 ⮫쪮, ᫨ ᠭ  㯭  ⮩ 
  ,  ந室 맮.  ᫥, 直 ଠ
  ࠬ, ᮮ⢥騩 ஬ 䠪᪮ ࠬ, 
   㯥, ᫨    (...).
      । 맮 直 䠪᪨ ࠬ ⨯ float,  ண
   ଠ쭮 ࠬ, ८ࠧ  ⨯ double,   ⨯
  char, short, ᫥  ⮢ ,  ண 
  ଠ쭮 ࠬ, ८ࠧ  ⨯ int  unsigned
  ᮣ᭮ ⠭ ८ࠧ 楫᫥ ($$R.4.1).
  ꥪ, 騩 ᮬ   騩 ᠭ ଠ쭮 ࠬ,
  ।  맮   .
      ꥪ, 騩 ᮬ  騩 ᠭ ଠ쭮
  ࠬ ।   樠樨 ଠ쭮 ࠬ
  䠪᪨ ࠬ஬,  ந室 । 믮
  㭪樨 ।⢮ 맮  ($$R.12.2, $$R.12.8).
      冷 ᫥ ࠬ஢ ।  ,  
    ࠧ祭  ࠧ ࠭஢.   䥪
  ࠦ 䠪᪨ ࠬ஢  ந室 । 砫
  믮 㭪樨. 冷 ᫥ 䨪 ࠦ 
  ᯨ᪠ ࠦ ࠬ஢ ।.
      ⨬ ४ᨢ 맮.
       맮 㭪樨 ஦  ⮫쪮, ᫨ ⨯
  १  .

  R.5.2.3  ८ࠧ ⨯

   -⮣-⨯ ($$R.7.1.6),  ன ᫥
  ᯨ᮪-ࠦ  ᪮ ࠧ 祭 㪠 ⨯
   ⮬ ᯨ᪠ ࠦ. ᫨ ᯨ᮪ ࠦ ᮤন 
   祭, ⨯   ᮬ  ஬, ᠭ
  ᮮ⢥騬 ࠧ ($$R.8.4, $$R.12.1).
      -⮣-⨯ ($$R.7.1.6),  ன ᫥
   ᪮ (), ࠧ 祭 㪠 ⨯. ᫨ ⨯
   ᮬ  ஬, ᠭ ᮮ⢥騬 ࠧ,
  㤥 맢  ,  ⨢ 砥 १⮬
  㤥 । 祭 㪠 ⨯, . ⠪  ($$R.5.4).

  R.5.2.4   童 

  䨪᭮ ࠦ,   ᫥ 窠 (.)  , 
  䨪 ࠦ. ࢮ ࠦ   ꥪ⮬ ⨯
  ,      童 ⮣ . ⮬ 㤥
   童 ꥪ   㤥 ᮬ, ᫨ 童 
  ᮬ.
     䨪᭮ ࠦ,   ᫥ ५ (->)   ,
   䨪 ࠦ. ࢮ ࠦ  
  㪠⥫  ꥪ ⨯ ,      童
  ⮣ . ⮬ 㤥  童 ꥪ, 
   ஥ 㪠⥫   㤥 ᮬ, ᫨ 童 
  ᮬ.  ࠦ E1->MOS ⮦ ᠬ,  (*E1).MOS.
      ,  "ꥪ ⨯ "  
  ࠬ ($$R.9.2)  ꥤﬨ ($$R.9.5).  㦤
   $$R.9.

  R.5.2.5 ६  ६

  祭, 砥  १ ਬ 䨪᭮ 樨 ++,
   祭 ࠭. ࠭   塞 ᮬ.
   ࠭   䬥᪨  ⨯ 㪠⥫. ᫥
  롮ન १ ( 쭥襣 ᯮ짮) ꥪ 㢥稢
   1.  १ ᮢ  ⨯ ࠭,   
  ᮬ (. ⠪  $$R.5.7  $$R.5.17).
     䨪᭠  -- ᢮  樨 ६ (㬥襭
   1)  筠 樨 ++.

  R.5.3  樨

  ࠦ  㭠묨 ﬨ 믮 ࠢ .

      㭠୮-ࠦ:
           䨪᭮-ࠦ
           ++ 㭠୮ ࠦ
           -- 㭠୮ ࠦ
           㭠ୠ- ࠦ-ਢ
           sizeof 㭠ୠ-
           sizeof ( -⨯ )
           ࠦ-ࠧ饭
           ࠦ-᢮
       㭠ୠ-:  
            *  &  +  -  !  ~

  ୠ  * 砥 ᢥ: ࠦ  
  㪠⥫,  १  ᮬ, 뫠騬  ꥪ, 
   㪠뢠 ࠦ. ᫨ ⨯ ࠦ  "㪠⥫  T",
   ⨯ १ 㤥 "T".
     ⮬ 㭠୮ 樨 & 㤥 㪠⥫   ࠭.
  ࠭   㭪樥  ᮬ  樥
  筥-.    砥, ᫨ ⨯ ࠦ
   "T",  ⨯ १ 㤥 "㪠⥫  T".  ⭮,
   ꥪ ⨯ const T  ⨯ const T*, ⮦ ୮ 
  volatile.   筥  ᫨ 童  "C"  
  ᪨   ⨯ "T",  ⨯ १ 樨 㤥
  "㪠⥫  童 C ⨯ T".  ᪨ 童 ⨯ T
  १⮬ 㤥  "㪠⥫  T".  ॣ㦥
  㭪樨 ($$R.13)   ⮫쪮  樠樨 
  ᢠ,  ஬   筮 । 
   ॣ㦥 㭪樨   ($R13.3).
      ࠭ 㭠୮ 樨 +   䬥᪮ ⨯
   ⨯ 㪠⥫  १⮬ 㤥 祭 ࠭. 
  楫᫥ ࠭  ந ⠭⭮ ८ࠧ
  楫᫥.  १  ⨯ ८ࠧ ࠭.
      ࠭ 㭠୮ 樨 -   䬥᪨ ⨯ 
  १⮬ 㤥   ࠭.  楫᫥
  ࠭ 믮 ⠭⭮ ८ࠧ 楫᫥.
     稭 믮   ⠭
  祭 ࠭  2**n,  n ᫮ ⮢  ।⠢
  ८ࠧ ࠭.  १  ८ࠧ
  ࠭.
      ࠭ 樨 ᪮ 栭 !  
  䬥᪨ ⨯   㪠⥫, १ ࠢ 1, ᫨
  祭 ࠭  0,  ࠢ 0, ᫨ ࠭  ࠢ 0.
   १  int.
     ࠭ 樨 ~   楫᫥ ⨯, १⮬
  㤥 饭 筮 ।⠢ ࠭. 믮
  ⠭ ८ࠧ 楫᫥.  १ 
  ⨯ ८ࠧ ࠭.

  R.5.3.1 ६  ६

  ࠭ 䨪᭮ 樨 ++ 㢥稢  1. ࠭ 
   塞 ᮬ.  ࠭   䬥᪨
   㪠⥫. ⮬   祭 ࠭,
   ⠥ ᮬ. ࠦ ++x ⭮ x+=1. 
  筥 ८ࠧ    ᠭ ᫮
  ($$R.5.7)  権 ᢠ ($$R.5.17).
      䨪᭠  -- ᢮  㬥襭  1  믮
  筮 䨪᭮ 樨 ++.

  R.5.3.2  sizeof

   sizeof  ࠧ ᢮ ࠭  . ࠭
     ࠦ, ஥  ,   ⨯
   ᪮.  sizeof  ਬ  㭪樨, ⮢ ,
  । , ⨯ void   ᨢ  㪠묨
  ࠭栬 ᮢ.    । 몮, ஬ 
  १ 樨 sizeof,  sizeof(char)  1.
     ᫨  ਬ  뫪, १⮬ 㤥 ࠧ
  ꥪ,   ஥ 뫪. ᫨  ਬ  ,
  १⮬ 㤥 ࠧ ꥪ ⮣     ⮬
   ⥫ ⮢,  ॡ  ࠧ饭
  ⠪ ꥪ  ᨢ.     ꥪ 
   .  砥 ᨢ  뤠  ᫮ ⮢
   ᨢ.  ᫥,  ࠧ ᨢ  n ⮢ ࠢ
  ࠧ , 㬭  n.
      sizeof  ਬ  㪠⥫  㭪,  
   ᠬ 㭪樨.
     ⮬ 樨 㤥 ⠭ ⨯ size_t.  ⨯
  ।  ⠭⭮ 筮 䠩 <stddef.h>  
  騬  ॠ樨  楫᫥ ⨯.

  R.5.3.3  new

   new ।祭  ᮧ ꥪ ⨯ -⨯
  ($$R.8.1).  ⨯   ⨯ ꥪ  㭪樨 
  ࠧ   ,  㪠⥫  㭪樨 .

       ࠦ-ࠧ饭:
            ::opt new ࠬ-new opt -⨯-new 樠-new
            ::opt new ࠬ-new opt ( -⨯ ) 樠-new
       ࠬ-new:
            ( ᯨ᮪-ࠦ )
       -⨯-new:
            ᯨ᮪-ᯥ䨪権-⨯ ⥫-new opt
       ⥫-new:
            * ᯨ᮪-ᯥ䨪権-cv opt ⥫-new opt
            - :: ᯨ᮪-ᯥ䨪権-cv opt ⥫-new opt
            ⥫-new opt [ ࠦ ]
       樠-new:
            ( ᯨ᮪-樠஢ opt )

  ६  ꥪ, ᮧ   new,  ࠭稢
   ,  ன   ᮧ.  new 頥
  㪠⥫  ᮧ ꥪ. ᫨ ꥪ  ᨢ,
  頥 㪠⥫  砫  ᨢ. ਬ,
   樨 new int  new int[1]  int* ,  ⨯
  new int[i][10] 㤥 int(*)[10]. ᫨ 뢠 ⨯ ᨢ
  ($$R.8.2.4),  ࠧ୮, ஬ ࢮ,   ࠦﬨ-
  ⠭⠬ ($$R.5.19)  ⥫ 祭. ࢠ ࠧ୮
  ᨢ   ந ࠦ,  ᫨
  ᯮ -⨯ ( 蠥 饥 ॡ, ⮡
  ࠧ୮ ᨢ  樨 -⨯ 뫨
  ࠦﬨ-⠭⠬ ($$R.5.19)).
     ᪠, ⮡ 뢠 㭪 operator new()  ࠬ஬
  .  ⠪ 砥 頥 㪠⥫  ꥪ.  ७
  ⠪ 맮   㪠⥫  ࠧ ꥪ.
     ᯨ᮪-ᯥ䨪権-⨯   ᮤঠ const,
  volatile, ᠭ   ᫥.
     १ࢨ஢   new 頥  㭪樨
  operator new() ($$R.12.5).  ࠧ饭 ꥪ ⨯ T  
  ⢥ ࢮ ࠬ । sizeof(T). 
  ࠬ-new ᯮ  । ⥫ ࠬ஢.
  ਬ,  new T ਢ  맮 operator new(sizeof(T)),
    new(2,f) T  ਢ  맮 operator new(sizeof(T),2,f).
        ࠬ-new  ᯮ짮 ⮫쪮, ᫨
  ᠭ 㭪 operator new()  ࠬࠬ ᮮ⢥ ⨯.
       ᫨   樨 new ᮧ ꥪ  ⨯ 
  ( ⮬ ᫥  ᨢ ꥪ⮢ ⨯ ),  뢠 쭠
  㭪 ::operator new(). ᫨   new ᮧ ꥪ 
  T, 뢠 㭪 T::operator new(), ᫨  
  (ᯮ  ࠢ ᬮ  ᪥ 童   
   ᮢ, $$R.10.1.1),  뢠 쭠 㭪
  ::operator new(). ᯮ짮 樨 ::new() ࠭, 
  㤥 뢠 쭠 㭪 ::operator new(),  ᫨
   T::operator new().
       ࠦ-ࠧ饭  ᮤঠ 樠-new.
   ꥪ⮢ ᮢ  ࠬ ($$R.12.1)  
  ᯨ᮪ ࠬ஢ 㤥 ᯮ짮  맮 , 
  㣨   樠-new   
  ( ࠦ )  ( ). ᫨ ࠦ ,  ᯮ
   樠樨 ꥪ, ᫨  , ꥪ 筥 ⢮
   । 祭.\
      ᫨   , ꥪ ⮣   ᮧ
    new ⮫쪮  ᫮,   室騥 ࠬ,
  ,    ⠭  ($$R.12.1).
  ⢮    ᮧ ꥪ ⨯  ᠬ 㭪
  operator new,  ⠢   ,   ॠ樨.
    , ⠪   㭪樨 operator new() ஢
  ஢ઠ  㯠  筮 ($$R.12).
      ᨢ   樠. ᨢ ꥪ⮢
  ⨯   ஬  ᮧ   樨 new
  ⮫쪮, ᫨    ⠭ ($$R.12.1).
   ⮬ 砥 ⠭  㤥 뢠  
   ᨢ.
     樠 ந ⮫쪮  ⮬ 砥,  㭪
  operator new() 頥 . ᫨  頥 0 (⮩
  㪠⥫), 祭 ࠦ  0.
     冷 ᫥ ࠦ 맮 operator new()  祭
    冷 ᫥ ࠬ஢  ।.
    ।   ࠬ , ᫨
  㭪 operator new() ⨫ 0.
      樨 -⨯-new ᪮ ᯮ짮 易⥫쭮.
   饭

      new int (*[10])();   // error

   ਢ  訡, .. 樨 ਬ  ⠪ 浪

      (new int) (*[10])(); // error

  ꥪ ᫮ ⨯    樨 new   
  㪠 ᪮, ਬ, 饭

      new (int (*[10])());

  ࠧ頥 ᨢ  10 㪠⥫  㭪樨 ( 騥 ࠬ஢
   騥 int).
      樨 -⨯-new  ࠦ-ࠧ饭  
  ᠬ    ᫥⥫쭮⥩ 権
  ⥫-new.  ।頥   ﬨ 
  ⥫ &, *, []     ࠦ, ਬ,

       new int* i;   // syntax error: parsed as `(new int*) i'
                     //               not s `(new int)*i'

   * ᯮ  ⥫ 㪠⥫,    ⢥
  樨 㬭.

  R.5.3.4  delete

   delete 㭨⮦ ꥪ, ᮧ   new.

         ࠦ-᢮:
            ::opt delete ࠦ-ਢ
            ::opt delete [] ࠦ-ਢ

    ⨯ void. ࠭ delete   㪠⥫,
   頥 new. 䥪 ਬ 樨 delete  㪠⥫,
    祭  १ 樨 new  
  ࠬ-new, ⠥ ।  筮 ਢ  
  ᫥⢨.  ࠭,  㤠  㪠⥫ 
  㫥 祭 ᭮.
       ⪨ 㯠  㤠 ꥪ ।, 
  㤠 ꥪ    祭.  ⮣, ᫨
  ࠦ, 饥 ꥪ,  塞 ᮬ, 
  祭 ᫥ 㤠 ।.
       㤠 㪠⥫  ⠭.
       delete 뢠  (᫨   $$12.4)
   ꥪ,   ஥  ࠭.
       ᢮ , ⢥  㪠뢠 ꥪ,
   delete 뢠 㭪 operator delete ($$R.12.5).
   ꥪ⮢,   ⨯  ( ⮬ ᫥   ᨢ
  ᮢ), ᯮ 쭠 㭪 ::operator delete().
   ꥪ ⨯  T 뢠 㭪 T::operator delete(),
  ᫨   (ᯮ  ࠢ ᬮ  ᪥
  童   ந   ᮢ, $$R.10.1.1), 
  ⨢ 砥 뢠 쭠 㭪 ::operator delete().
  饭 ::delete ࠭,  㤥 뢠 쭠
  㭪 ::operator delete(),  ᫨  T::operator delete().
   㤠 ᨢ ᯮ 饭 

        delete [ ] ࠦ-ਢ

   ࠦ  㪠뢠  ᨢ. ᫨  ,
    뢠  㤠 㪠 ꥪ⮢.
       㤠 ᨢ   ⮣ 饭 delete
  ।, ⠪    㤠 筮 ꥪ  
  delete [].

  R.5.4  ८ࠧ ⨯

   ८ࠧ ⨯     㭪樮쭮
   ($$R.5.2.3)    樨 ਢ.

         ࠦ-ਢ:
             㭠୮-ࠦ
             ( -⨯ ) ࠦ-ਢ

     樨 ਢ ᯮ  祭
  ८ࠧ  ⨯,    樥
  -⮣-⨯.
       樨 ਢ  । ⨯.
      类 ८ࠧ ⨯,  㯮⮥    饥
  ८ࠧ  । 짮⥫ ($$R.12.3), ⠥
  訡.
       ⨯,   ८ࠧ  㣮  
  ⠭⭮ ८ࠧ ($$R.4),  ⠪ ८ࠧ
     ८ࠧ (ਢ)   ८ࠧ
  㤥  .
      ⥫  ८ࠧ   楫᫥ ⨯,
  筮 讬, ⮡  祭 㪠⥫. 
  ८ࠧ   ॠ樨,  ।,  
  㤥 ⢥  ⮣,   ⥬ 樨, ᯮ㥬
  設.
      祭 楫᫥ ⨯    ८ࠧ 
  㪠⥫. ⥫, ८ࠧ  楫 筮 ࠧ
  (᫨ ⠪   ॠ樨),  ८ࠧ ⭮  ⨯
  㪠⥫,   ᢮ ࢮ砫쭮 祭.  㣨
  ⠫ ॢ 㪠⥫  楫  ⭮   ॠ樨.
      ⥫  ꥪ  ⨯   ८ࠧ 
  㪠⥫  ꥪ 㣮 ⨯ ( ᮡ ࠭祭, 㪠
  ). ᯮ짮 稢襣 㪠⥫  맢
  ᮡ   (" "), ᫨ ८ࠧ㥬
  㪠⥫ 
  ஥  ꥪ, ࠢ ࠧ ࠢ  .
  ࠭,  㪠⥫  ꥪ  ࠧ 
  ८ࠧ  㪠⥫  ꥪ ࠢ  襣 ࠧ
   ஢ ⭮ ८ࠧ   祭 㪠⥫.
   ࠧ 設 筮 ।⠢ 㪠⥫  
  ࠧ筮   ॡ  ࠢ ꥪ⮢. ⠢
  ꥪ ࠢ  ᠬ ண ࠭, ॡ㥬 
  ⠢騬. ⥫ ⨯ void* ⠥ ᮢ⨬ 
  㪠⥫  ꥪ  ⨯.
      ⥫   B  ८ࠧ  㪠⥫   D,
   ண  B  אַ  । 
  ᮬ, ᫨  筮 ८ࠧ  D  B
  ($$R.4.6, $$.R10.1.1)  ᫨ B  㠫  ᮬ
  ($$R.10.1).  ਢ     ந
   ।,  ꥪ    
   ⭮襭  ꥪ ந .  १ 
  㪠⥫, ஥  ꥬ騩 ꥪ ந .
  ᫨ ꥪ    ᮤন    ꥪ
  ந , ⠪  ਢ  맢
  ᮡ .
      ⮩ 㪠⥫ (0) ८ࠧ ᠬ  ᥡ.
        ।   ᯮ짮  樨
  ਢ 㪠⥫,  ⮬ 砥  饭  
     ($$R.10.1).
       ꥪ   ८ࠧ  ⨯ 뫪 X&, ᫨
  㪠⥫   ꥪ   ८ࠧ  ⨯ X*.
   १ ਢ  뫪  ந室 맮 ஢
   㭪権 ८ࠧ. ८ࠧ 뫪   
   뫪  ந  ᬠਢ 筮
  ८ࠧ 㪠⥫     㪠⥫ 
  ந , 뢠  筮, 㠫
  ᮢ  ..
      ⮬ ਢ  뫪  ,  ⫨稥  
  ⠫ ਢ.  ਢ 㪠⥫  뫪
  ஥    ꥪ,   室 ࠦ  樨
  ਢ.
     ⥫  㭪   ८ࠧ  㪠⥫ 
   ꥪ  ᫮,  ⨯ 㪠⥫   ꥪ
  筮 , ⮡ ࠭ 㪠⥫  㭪. ⥫
    ꥪ   ८ࠧ  㪠⥫  㭪
   ᫮,  ⨯ 㪠⥫  㭪 筮 , ⮡
  ࠭ 㪠⥫   ꥪ.   , ᯮ짮
  㪠⥫, 稢襣  १ ८ࠧ, 
  맢 ᮡ  ,  - 㦥,
  ᫨ 室 㪠⥫  ஥  ᮮ⢥騩 ꥪ.
     ⥫  㭪  ⨯   ८ࠧ 
  㪠⥫  㭪 㣮 ⨯.  맮 㭪樨 
   㪠⥫  㭪, ⨯ ன ⫨祭  ⨯,
  ᯮ짮  । ࢮ 㭪樨, ।
  (. ⠪  $$R.4.6).
     ꥪ  祭  ८ࠧ  ꥪ ⨯ 
  ⮫쪮  ᫮,  । 室騩  
   ८ࠧ ($$R.12.3).
    ⥫  童   ८ࠧ  㪠⥫  㣮
  童, ᫨   ⨯  ⨯ 㪠⥫
   童  , , ᫨  ⨯  㪠⥫ﬨ
   㭪-童 ᮢ,    砥  筮
  ந  㣮 ($$R.4.8).
      ⥫  ꥪ  ⨯, 騬 ᯥ䨪 const, 
  ਢ  㪠⥫  ⨯  ᯥ䨪樨 const. 稢訩
   १ 㪠⥫ 㤥 ஥  室 ꥪ.
  ꥪ  ⨯, 騬 ᯥ䨪 const,  뫪  ꥪ
  ⠪ ⨯  ਢ  뫪  ꥪ  ⨯  const.
  稢  १ 뫪 㤥 ஥  室
  ꥪ.  १ ⪨   ꥪ  
  ⠪ 뫪  㪠⥫   ᮡ  
   㤥 ⠪ ,   饭   室 뫪
   㪠⥫  ꥪ, ⨯ ண  ᮤন const. 
   ᮡ ᭠    ॠ樨.
     ⥫  ꥪ ⨯  ᯥ䨪樥 volatile  ਢ
   㪠⥫  ꥪ ⨯  volatile.  १ 
  㪠⥫, ஥  室 ꥪ. ꥪ ⨯  volatile
   뫪  ⠪ ꥪ  ਢ  뫪  ꥪ  ⨯
   volatile.

  R.5.5 樨 㪠⥫--童

  樨 㪠⥫--童 ਬ ᫥ ࠢ.

       ࠦ-pm:
          ࠦ-ਢ
          ࠦ-pm .*  ࠦ-ਢ
          ࠦ-pm ->* ࠦ-ਢ

      ୠ  .* 뢠 ᢮ ன ࠭,  
   ⨯ "㪠⥫  童  T",   ࠭, 騬
  ⨯  T  ⠪ ,  ண T  筮
  ।  ⨦  ᮬ. ⮬ 㤥 ꥪ
   㭪  ⨯,   ࠭.
     ୠ  ->* 뢠 ᢮ ன ࠭,  
   ⨯ "㪠⥫  童  T",   ࠭, 騬
  ⨯ "㪠⥫  T"  ⨯ "㪠⥫  ,  ண T
   筮 ।  ⨦  ᮬ".
  ⮬ 㤥 ꥪ  㭪  ⨯,  
  ࠭.
   ᫨ १ .*  ->*  㭪,    ᯮ짮
  ⮫쪮  ⢥ ࠭ 樨 맮 㭪樨 (), ਬ,
  

       (ptr_to_obj->*ptr_to_mfct)(10);

  ਢ  맮 㭪樨-童, 祭 ptr_to_mfct, 
  ꥪ,   ஥ 㪠⥫ ptr_to_obj. 
  樨 .*  ->*  ᮬ, ᫨ ன ࠭ 
  .

  R.5.6 ⨯⨢ 樨

  ⨯⨢ 樨 *, /,  % 믮 ᫥ ࠢ.

      ⨯⨢-ࠦ:
             ࠦ-pm
             ⨯⨢-ࠦ * ࠦ-pm
             ⨯⨢-ࠦ / ࠦ-pm
             ⨯⨢-ࠦ % ࠦ-pm

  ࠭ 権 *  /   䬥᪨ ⨯, ࠭
   %   楫᫥ ⨯.  䬥᪨
  ८ࠧ ($$R.4.5) ந  ࠭  ।
  ⨯ १.
      ୠ  * 砥 㬭.
      ୠ  /  ⭮,  ୠ  %
   ⮪   ࢮ ࠦ  ஥. ᫨
  ன ࠭  /  %  0, १ ।, 
  (a/b)*b + a%b  ࠢ a. ᫨  ࠭ ⥫,
   ⠪  㤥  १,  ⨢ 砥  १
  । ॠ樥.


   R.5.7 ⨢ 樨

  ⨢ 樨 +  - 믮 ᫥ ࠢ,  ⮬
  ந室  䬥᪨ ८ࠧ ($$R.4.5)
  ࠭ 䬥᪮ ⨯.

         ⨢-ࠦ:
               ⨯⨢-ࠦ
               ⨢ ࠦ + ⨯⨢-ࠦ
               ⨢-ࠦ - ⨯⨢-ࠦ

  ࠭   䬥᪮ ⨯  ⨯ 㪠⥫.
  ⮬ 樨 +  㬬 ࠭.  ᪫뢠
  㪠⥫  ꥪ  ᨢ  祭  楫᫥ ⨯.
  ⮬ 㤥 㪠⥫ ⮣  ⨯,   室 㪠⥫,
    㤥 ஥  㣮 ꥪ ᨢ
    ᬥ饭  室 ꥪ. , ᫨ P
   㪠⥫  ꥪ ᨢ, ࠦ P+1  㪠⥫
   ᫥騩 ꥪ ᨢ. ᫨  稢訩  १
  ᫮ 㪠⥫ 襫  ࠭  ᨢ, १ 㤥
  ।, ஬ ,  㪠⥫ ஥   
  訩 孥 ࠭ ᨢ.
      ⮬ 樨 - 㤥 ࠧ ࠭. 祭
   楫᫥ ⨯    㪠⥫,  ⮬
  ਬ   ८ࠧ,    樨 +.
       㣨 ⠭ ⨯  㪠⥫  ⨬.
      ᫨   㪠⥫  ꥪ  ⨯, १⮬
  㤥 楫᫥ 祭  , ஥ 뢠  ᪮쪮
  ꥪ⮢ ⮣ ⨯    㣠 㪠㥬 ꥪ. ⥫
   ᥤ  ᨢ   1.  १  
  ॠ樨,     ।  ptrdiff_t  ⠭⭮
  筮 䠩 <stddef.h>.   ।, ᫨ 㪠⥫
   ஥    ᨢ. ᫨ P  㪠⥫
   ᫥  ᨢ,  (P+1) - 1  P.

  R.5.8 樨 ᤢ

  樨 ᤢ <<  >> 믮 ᫥ ࠢ.

        ᤢ-ࠦ:
            ⨢-ࠦ
            ᤢ-ࠦ << ⨢ ࠦ
            ᤢ-ࠦ >> ⨢ ࠦ

  ࠭   楫᫥ ⨯,    ந
  ⠭ 楫᫥ ८ࠧ.  १ ᮢ
   ⨯ ८ࠧ  ࠭.   ।,
  ᫨ ࠢ ࠭ ⥫    ࠢ  ࠧ冷
   筮 ।⠢ ८ࠧ  ࠭.
  祭 ࠦ E1<<E2 㤥 E1 (ᬠਢ  
  ࠧ冷), ᤢ⮥   E2 ࠧ冷, 祬 ᢮訥
  ࠧ  ﬨ. 祭 ࠦ E1>>E2 㤥 E1,
  ᤢ⮥ ࠢ  E2 ࠧ冷. ᫨ E1  ⨯ 
   ⥫쭮 祭, ࠭,  ᤢ ࠢ
  - ᪨ ( ﬨ),  १   ॠ樨.

  R.5.9 樨 ⭮襭

  樨 ⭮襭 믮 ᫥ ࠢ,   䠪  
  ,  ࠦ a<b<c 砥 (a<b)<c,    (a<b)&&(b<c).

         ࠦ-⭮襭:
            ᤢ-ࠦ
            ࠦ-⭮襭 <  ᤢ-ࠦ
            ࠦ-⭮襭 >  ᤢ-ࠦ
            ࠦ-⭮襭 <= ᤢ-ࠦ
            ࠦ-⭮襭 >= ᤢ-ࠦ

  ࠭   䬥᪮ ⨯  ⨯ 㪠⥫.
  樨 < ( 祬), > ( 祬), <= (  ࠢ) 
  >= (  ࠢ)  १ 0, ᫨ 㪠 ⭮襭
   믮,  1, ᫨  믮.  १ int.
      䬥᪨ ࠭ 믮  䬥᪨
  ८ࠧ.  㪠⥫ﬨ 믮  ८ࠧ
  㪠⥫. ।,   㪠⥫  ࠢ
   ࠦ, 騬 १ 0,   㪠⥫  ࠢ
   㪠⥫, 騬 ⨯ void* ( ⮬ 砥 㪠⥫ ᭠砫
  ८ࠧ  ⨯ void*). ⥫  ꥪ  㭪樨
   ⨯ (᫥ ८ࠧ 㪠⥫)  ࠢ,
  १    ᯮ   ꥪ⮢ 
  㭪権.
       㪠⥫      ꥪ  ࠢ묨. ᫨
   㪠⥫ ஥  ᪨ 童  ꥪ, 
  㪠⥫, ஥  童, ᠭ , ⠥
  訬,  ᫮,  童   ࠧ ᯥ䨪権
  㪠⥫-㯠 ($$R.11.1),     ꥤ.
  ᫨  㪠⥫ ஥  ᪨ 童  ꥪ
   ᯥ䨪樨 㪠⥫-㯠 ($$R.11.1)  童 ࠧ,
  १ 㤥  ।. ᫨  㪠⥫ ஥  童
  ()   ⮣  ꥤ,   ࠢ묨. ᫨ 
  㪠⥫ ஥    ᨢ  ᬮ  ࠭
  ᨢ,  㪠⥫, ஥    訬 ᮬ,
  㤥 訬.  㣨 ࠢ 㪠⥫ ।
  ॠ樥.

  R.5.10 樨 ࠢ  ࠢ⢮

       ࠦ-ࠢ⢠:
             ࠦ-⭮襭
             ࠦ-ࠢ⢠ == ࠦ-⭮襭
             ࠦ-ࠢ⢠ != ࠦ-⭮襭

  樨 == (ࠢ)  != ( ࠢ)  
  ⭮襭,  ᪫祭 ⮣,   ਮ . ( ࠧ,
   a<b == c<d  १ 1, ᫨ ࠦ a<b  c<d
       祭.)
      ஬ ⮣,  ࠢ 㪠⥫  童  ⨯.
  ந ८ࠧ 㪠⥫  童 ($$R.4.8). ⥫
   童  ࠢ  ࠦ-⠭⮩, ஥ 
  १ 0.

  R.5.11 ࠧ來  

       ࠦ-:
            ࠦ-ࠢ⢠
            ࠦ- & ࠦ-ࠢ⢠

  믮  䬥᪨ ८ࠧ, १ -
  ࠧ來 㭪   ࠭.   ਬ ⮫쪮 
  楫᫥ ࠭.

  R.5.12 ࠧ來 (᪫)  

            ࠦ-᪫饣-:
                 ࠦ-
                 ࠦ-᪫饣- ^ ࠦ-

  믮  䬥᪨ ८ࠧ, १ -
  ࠧ來 ᪫ 㭪   ࠭.  ਬ
  ⮫쪮  楫᫥ ࠭.

  R.5.13 ࠧ來 ()  

        ࠦ-:
             ࠦ-᪫饣-
             ࠦ- | ࠦ-᪫饣-

  믮  䬥᪨ ८ࠧ, १ -
  ࠧ來 㭪   ࠭.  ਬ ⮫쪮
   楫᫥ ⨯.

  R.5.14 ᪠  

          ᪮-ࠦ-:
               ࠦ-
               ᪮-ࠦ- && ࠦ-

  樨 && 믮 ᫥ ࠢ.    १
  1, ᫨  ࠭  ⫨  ,  १ - 0. 
  ⫨稥  &  樨 && ࠭ ᫥ ᫥ ࠢ,
   ⮣, ன ࠭  , ᫨  ࠭ ࠢ 0.
      ࠭  易⥫쭮   ⨯,    
  䬥᪮ ⨯  ⨯ 㪠⥫.  १ int. 
   䥪 ᫥ ࢮ ࠦ   
  ᫥ ண ࠦ.

  R.5.15 ᪠  

          ᪮-ࠦ-:
               ᪮-ࠦ-
               ᪮-ࠦ- || ᪮-ࠦ-

  樨 || 믮 ᫥ ࠢ.  樨 1, ᫨
     ࠭ ⫨祭  ,  १ - 0.  ⫨稥
   |  樨 || ࠭ ᫥ ᫥ ࠢ, 
  ⮣, ன ࠭  , ᫨ 祭 ࢮ ࠭
  ⫨筮  .
     ࠭  易⥫쭮   ⨯,    
  䬥᪮ ⨯  ⨯ 㪠⥫.  १ int. 
   䥪 ᫥ ࢮ ࠦ   
  ᫥ ண ࠦ.

  R.5.16  ᫮

          ࠦ-᫮:
               ᪮-ࠦ-
               ᪮-ࠦ- ? ࠦ : ࠦ-᫮

  ᫮ ࠦ 믮 ᫥ ࠢ. ࢮ ࠦ 
   䬥᪮ ⨯  ⨯ 㪠⥫.  , ,
  ᫨ १  ⫨祭  ,  १⮬ ᫮ ࠦ
  㤥 祭 ண ࠦ,  १ - 祭 쥣
  ࠦ.   䥪 ᫥ ࢮ ࠦ 
    ᫥ ண  쥣 ࠦ.
        ᫨ ஥   ࠦ 䬥᪮ ⨯,  ⨯ 
  ᮢ,  ⠪  㤥  ⨯ १, ᫨  ࠧ, 
  믮  䬥᪨ ८ࠧ, ⮡ ਢ 
   饬 ⨯. ᫨ ஥   ࠦ 
  㪠⥫ﬨ  ࠦ-⠭⮩, 騬 १ 0, 믮
  ८ࠧ 㪠⥫, ⮡ ਢ १ ࠦ 
  饬 ⨯. ᫨ ஥   ࠦ  뫪,
  믮 ८ࠧ 뫮, ⮡ ਢ   饬 ⨯.
  ᫨ ஥   ࠦ  ⨯ void, 騩 ⨯
  㤥 void. ᫨ ஥   ࠦ   ⨯
   T, 騬 ⨯ 㤥 T. , ࠦ ⠥ ⨬.
   १  騩 ⨯.  ⮫쪮 ஥  
  ࠦ (  ).  㤥 ᮬ, ᫨ ன 
  ⨩ ࠭  ⨯   ᠬ.

  R.5.17 樨 ᢠ

   ᪮쪮 権 ᢠ,   믮
  ࠢ .    ॡ, ⮡  ࠭ 
  塞 .  ࠦ ᢠ ᮢ  ⨯
   ࠭.  樨 ᢠ - 祭,
  ࠭饥   ࠭ ᫥ ⮣  ந諮 ᢠ.
    ᮬ.

        ࠦ-ᢠ:
           ࠦ-᫮
           㭠୮-ࠦ -ᢠ ࠦ-ᢠ
           -ᢠ:  
                =  *=  /=  %=  +=  -=  >>=  <<=  &=  ^=  |=

   ⮬ ᢠ (=) 祭 ࠦ  ᮡ 祭
  ꥪ,   ᮯ⠢  ࠭. ᫨  ࠭
  䬥᪮ ⨯, ࠢ ࠭, ० 祬 ந
  ᢠ, ८ࠧ  ⨯  ࠭. 
  ८ࠧ  ⨯ ᫥ ($$R.7.2)  ந, ⮬
  ᫨  ࠭  ⨯ ᫥, ࠢ ࠭ 
   ⠪ . ᫨  ࠭  ⨯ 㪠⥫, ࠢ
  ࠭   ⨯ 㪠⥫  ࠦ-⠭⮩, 騬
  १ 0. ࠢ ࠭ ८ࠧ  ⨯  ࠭,
  ० 믮 ᢠ.
     ⥫ ⨯ T* const  ᢠ 㪠⥫ ⨯ T*, 
  ⭮ ᢠ ⠥  ($$R.7.1.6). ꥪ
  ⨯ const T  volatile T  ᢠ   ⨯ T 
  volatile T (. ⠪  $$R.8.4).
     ᫨  ࠭  ⨯ 㪠⥫  童, ࠢ ࠭
    ⨯ 㪠⥫  童  ࠦ-⠭⮩,
  騬 १ 0; । ᢠ ࠢ ࠭ ८ࠧ
   ⨯  ࠭.
     ᢠ ꥪ⠬  X ($$R.9)  㭪樥
  X::operator=() ($$R.13.4.3). ᫨ 짮⥫  ।
  ᢮ 㭪 X::operator=(),  ᢠ ᯮ
  ⠭ ਠ ($$R.12.8).   ᫥,  ꥪ ,
       ந  X,  
  筮 ᠭ  ந   public ($$R.4.6),
   ᢮ ꥪ X.
      ⥫  童  B  ᢠ 㪠⥫  童
  ⮣  ⨯  D  ᫮,  D   
   ந  B,  筮 ᠭ 
  ந   public ($$R.10.1.1).
      ᢠ ꥪ ⨯ "뫪  T" ᢮  ᢠ
  ꥪ ⨯ T,  砥 뫪.
     믮 ࠦ  E1 op= E2 ⭮ 믮
  E1 = E1 op (E2),  E1    ࠧ.  
  +=  -=  ࠭   㪠⥫,  ⮬ 砥 ࠢ
  (楫᫥) ࠭ ८ࠧ ⠪,  﫮  $$R.5.7.
   ࠢ ࠭    ࠭,  騥 뫪,
    䬥᪮ ⨯.
      ꥪ⮢  ᢠ  饬 砥  ᮢ 
  樠樥 ($$R.8.4, $$R.12.1, $$R.12.6, $$R.12.8).

  R.5.18  

  樨  믮 ᫥ ࠢ.

         ࠦ:
              ࠦ-ᢠ
              ࠦ, ࠦ-ᢠ

   ࠦ, ࠧ ⮩,  ᫥ ࠢ 
  祭  ࠦ 㭨⮦.   䥪 ᫥
   ࠦ    ᫥ ࠢ ࠦ.
    祭 १ ᮢ  ⨯  祭 ࠢ
  ࠦ.   ᮬ, ᫨ ⠪ 
  ࠢ ࠦ.
       ⥪,    ᯥ樠쭮 祭, ᪠
   ᯨ᪥ 䠪᪨ ࠬ஢ 㭪樨 ($$R.5.2.2)   ᯨ᪥
  樠஢ ($$R.8.4), ᠭ   
    ⮫쪮  ᪮, ਬ, 맮 㭪樨

       f(a, (t=3,t+2), c);

  ᮤন  ࠬ, 祬 ன  祭 5.

  R.5.19 ࠦ-⠭

   ᪮쪨  ᠭ ++ ॡ ࠦ, 
    १ 楫᫥ ⠭, ਬ:   ࠭
  ᨢ ($$R.8.2.4),  ࠦ case ($$R.6.4.2),
     ⮢  ($$R.9.6)   樠饥
  祭  ᫥ ($$R.7.2).

         ࠦ-⠭:
               ࠦ-᫮

   樨 ࠦ-⠭  ⢮: ࠫ
  ($$R.2.5),  ᫥, 祭 楫᫥ ⨯ 
  ᯥ䨪樥 const, 樠஢ ࠦ-⠭⮩
  ($$R.8.4)  ࠦ sizeof. ⠭  饩 窮 ($$R.2.5.3)
    ਢ  楫᫥ ⨯. ⨬ ⮫쪮
  ८ࠧ ⨯  楫᫥ ⨯.  ⭮  ⨬
  㭪樨, ꥪ ᮢ, 㪠⥫  뫪, ᫨   
  ᯮ짮  sizeof.     ᢠ
   ⨬  ࠦ-⠭.

  R.6 

   ,  ᪫祭 ७ 砥, 믮
    㣨.

       :
         祭-
         -ࠦ
         ⠢-
         롨騩-
         -横
         -室
         -ᠭ

  R.6.1 祭 

    ᭠ ⪮.

         祭-:
             䨪 : 
             case ࠦ-⠭ : 
             default : 

  ᯮ짮 䨪  ⢥ ⪨   ।.
  䨪 ⪨  ᯮ짮  ⮣ ⮫쪮  ⢥
  㪠 室   goto.   ⪨ 
  㭪,  ன  . ⪨  ୮ 뢠
   ।  㭪樨.  ᯮ짮    goto
    ।. ⪨  ᢮ ࠭⢮  
    㯠    㣨 䨪ࠬ.
      ⪨  case  default   ⮫쪮  
  ४⥫.

  R.6.2 -ࠦ

   ᥣ ࠬ 뢠 ࠦ;  ⮬ 砥 
   ⠪ :

          -ࠦ:
              ࠦ opt ;

  筮 -ࠦ  ᢠﬨ  맮
  㭪権.   䥪 믮 -ࠦ
  ந室  믮 ᫥饣 . -ࠦ 
  騬 ࠦ 뢠  ஬. 
   ਣ, ᫨ 室 ⠢  । ᠬ 殬
  ⠢  ({)    ⮣ ⥫ 
  横 while ($$R.6.5.1).

  R.6.3 ⠢   

    砥,     㦭 ᯮ짮
  ᪮쪮, ।ᬮ७ ⠢  (  뢠
  "").

             ⠢-:
                 { ᯨ᮪-஢ opt }

             ᯨ᮪-஢:
                  
                  ᯨ᮪-஢ 

  ⬥⨬,  ᠭ ⠥ ஬ ($$R.6.7).

  R.6.4 롨騩 

  롨騥  롨   ᪮쪨  ࠢ.

          롨騩-:
               if ( ࠦ ) 
               if ( ࠦ )  else 
               switch ( ࠦ ) 

    롨饬-    ᠭ.

  R.6.4.1  if

  ࠦ   䬥᪮ ⨯,  ⨯ 㪠⥫, 
  ⨯ ,  ண  筮 ८ࠧ
   䬥᪨ ⨯  ⨯ 㪠⥫ ($$R.12.3).
       ࠦ,  ᫨   ⫨   १,
  믮   . ᫨ ᯮ짮 
  else  ࠦ  १ 0, 믮 ன 
  . 筮  砥 ᪮쪨 ﬨ else
  ࠧ蠥 ⥬ ⭥ᥭ else  ᫥ ⨢襬 if,
   ண  뫮 else.

  R.6.4.2  ४⥫

   ४⥫ 뢠 । ࠢ   
  ᪮쪨 ஢  ᨬ  祭 ࠦ.
      ࠦ   楫᫥ ⨯  ⨯ , 
  ண  筮 ८ࠧ  楫᫥
  ⨯ ($$R.12.3). 믮 ⠭ 楫᫥ ८ࠧ.
    ஢ ४⥫     ᪮쪨
  䨪ᠬ, 騬 :

       case ࠦ-⠭ :

   ࠦ-⠭ ($$R.5.19) ਢ  ८ࠧ
  ⨯ ࠦ ४⥫.   ⠭  case 
  ४⥫     祭.
       ४⥫   ⮫쪮  䨪 

       default:

      ४⥫   묨, ⮣ ⪨ 
  case  default ⭮  ᠬ ࢮ ४⥫,
  ꥬ饬 .
      믮  ४⥫  ࠦ,
     祭 ࠢ    ⠭ ਠ⮢ (case).
  ᫨    ⠭ ࠢ 祭 ࠦ,  ࠢ
  ।  , 騩  ⮩ ⠭⮩. ᫨   
  ⠭  ᮢ  祭 ࠦ,   䨪
  default,  ࠢ ।    ⨬ 䨪ᮬ.
  ᫨ 䨪 default ,  ᮢ  뫮,   믮
     ஢ ४⥫.
     ᫨ , 믮塞  १ 롮,  ਢ
   - ।砬 ࠢ,  ணࠬ த 믮
  " ⪠ case  default" ९⢥. 室  ४⥫
      break (. $$R.6.6.1).
     筮 ,     ४⥫, 뢠
  ⠢. ᠭ     ४⥫.
   室  ᠭ,  ஬ 뫠   
  樠, ⠥ , ᫨ ⮫쪮 ᠭ 
  室  ७ ,  室 (.. 
  室  । ࠢ, $$R.6.7).  ᫥,
   ᠭ     樠樥  ᮤঠ
   ७ .

  R.6.5  横

      横.

      -横:
            while ( ࠦ ) 
            do   while (ࠦ)
            for ( - ࠦ opt ; ࠦ opt ) 
            -:
                    -ࠦ
                    -ᠭ

     ,   - 砥 窮 
  ⮩.
      -横    ᠭ.

  R.6.5.1  while

    while   믮   ,
   祭 ࠦ  ⠭ ࠢ . ஢ઠ ந室
  ।  믮 .
    ࠦ   䬥᪮ ⨯,  ⨯ 㪠⥫, 
  ⨯ ,  ண  筮 ८ࠧ 
  䬥᪨ ⨯  ⨯ 㪠⥫ ($$R.12.3).

  R.6.5.2  do

    do   믮   ,
   祭 ࠦ  ⠭ ࠢ . ஢ઠ ந室
  ᫥  믮 .
      ࠦ   䬥᪮ ⨯,  ⨯ 㪠⥫,
   ⨯ ,  ண  筮 ८ࠧ
   䬥᪨ ⨯  ⨯ 㪠⥫ ($$R.12.3).

  R.6.5.3  for

   for
     for (- ࠦ-1 opt ; ࠦ-2 opt ) 
  ⥭ 樨
     -
     while (ࠦ-1) {
           
           ࠦ-2 ;
     }

   ᪫祭 ⮣ 䠪,   continue   for
  맮 믮 ࠦ-2 । ⥬&   ୮
  ᫥ ࠦ-1.  ࠧ,   
  樠  横, ࢮ ࠦ ந ஢,
  믮塞 ।  蠣 横, ⠪  横 蠥, 
  ࠦ ⠭ 㫥,  ஥ ࠦ 筮 
  饭,    ᫥  蠣 横. ࢮ
  ࠦ   䬥᪨ ⨯,  ⨯ 㪠⥫, 
  ⨯ ,  ண  筮 ८ࠧ
   䬥᪮ ⨯  ⨯ 㪠⥫ ($$R.12.3).
        饭    ࠦ. ᫨ 
  ࠦ-1,   横  while  ᫮ while (1).
      ᫨ -  ᠭ,   ,
  ᠭ  , ࠥ   , 뢠饣 
  for.

  R.6.6  室

   室  ᫮ । ࠢ.

       -室:
             break ;
             continue ;
             return ࠦ opt ;
             goto 䨪 ;

     室    (  ࠧ   ந諮)
  뢠  ($$R.12.4)   ꥪ⮢ ᮢ,
  ஥  ⮩ ,    뫨 㭨⮦. 
  ⭮    ᠭ ꥪ⠬, ⠪   ६ ꥪ⠬
  ($$R.12.2).

  R.6.6.1  break

   break   ⮫쪮   横 
  ४⥫,  ਢ  砭 襣  ꥬ
   ஢ 横  ४⥫. ࠢ । 
  , ᫥騩 ।⢥  稢, ᫨ ⠪ .

  R.6.6.2  continue

   continue   ⮫쪮   横 
  ਢ  । ࠢ   襣
   ꥬ ஢ 横, ..   横.  筮
   ᪠,     ஢:

      while (foo) {      do  {           for (;;) {
      // ...             // ...          // ...
      contin: ;          contin: ;       contin: ;
      }                  } while (foo);  }

   continue,  ⭮騩  譨 ࠬ 横,
  ⥭  goto contin.

  R.6.6.3  return

    㭪樨  ⨢   㭪 ந室  
   return.
      return  ࠦ  ᯮ짮 ⮫쪮 
  㭪,    祭, ..  㭪,
   祭 ⨯ void,    ($$R.12.1)
    ($$R.12.4).  return  ࠦ 
  ᯮ짮 ⮫쪮  㭪,   祭. 祭
  ࠦ ।   㭪, 맢  㭪. ᫨
  㦭, 祭 ८ࠧ  ⨯ 㭪樨,  ன 믮
  return,  ⥬  ࠢ   樠樨.   ਢ
   맮   ஢ ६ ꥪ⮢ ($$R.12.2).
  室  㭪樨   ⥭   뤠
  祭,     㭪樨, 饩
  祭.

  R.6.6.4  goto

   goto ᫮ । ࠢ  ,
  祭 䨪஬. 䨪   ⪮
  ($$R.6.1), 室饩  ⥪饩 㭪樨.

  R.6.7  ᠭ

   ᠭ     䨪  
  :

       -ᠭ:
      ᠭ

  ᫨ 䨪,    ᠭ, 㦥  ࠭
  ᠭ  譥 , 譥 ᠭ ⠭  
   , ᫥ 祣   㯠  ᨫ.
       樠樨 ⮬᪨ (auto)  ॣ஢ (register)
  ६ ந  ࠧ,  믮
  -ᠭ. ⮦  ६, ᠭ 
  , ந室  室   ($$R.6.6). ⮦
  ⮬᪨ ६, ।  横, ந室
    蠣 横. ਬ, ६ Index j ᮧ 
  㭨⮦  ࠧ  祭 横  i:

       for (int i = 0; i<100; i++)
    for (Index j = 0; j<100; j++) {
    // ...
    }

  室  横     室,  樠
  ⮬᪨ ६, ਢ  㭨⮦ ⮬᪨
  ६, ᠭ  窥, 㤠 ந室 室,  
   窥, 㤠 ந室 室.
      室     ᫮,    ਢ 
  ய 樠樨. ⠥  室, 室騩
  ᠭ     樠樥, ஬ 砥, 
   室  ७ ,  ய᪠ (..  
     ࠢ)  室 ந室  ⮩ 窨,
   㦥 뫠 樠 ६. ਬ,

       void f()
       {
   // ...
   goto lx;  //訡: 室,  樠
   // ...
       ly:
    X a = 1;
    // ...
       lx:
    goto ly; // ଠ쭮,  室 㤥 맮
             //   `a'
       }

   ⮬᪠ ६,  뫠 ᮧ  ஬
   ᫮, 㭨⮦  믮 ⮣ ᫮,   
    㯭  ஢ન ⮣ ᫮. ਬ,

   if (i)
           for (int j = 0; j<100; j++) {
           // ...
   }
   if (j!=100)  // 訡: 饭  ᫮
    // ...
    ;

    樠 쭮 ꥪ  ᮬ  static ($$R.7.1.1)
  ந ०, 祬 ࠢ  ன १  
  ᠭ. ᫨ ᪠ ६ 樠 ࠦ,
  ஥   ࠦ-⠭⮩,  ।  室
    ந室 ⠭⭠ 樠 㫥, ਢ
   㦭 ⨯ ($$R.8.4).
        쭮 ᪮ ꥪ 㤥 뢠
   ⮬  ⮫쪮  ⮬ 砥, ᫨ ६ 뫠 ᮧ  
  .   뢠 ࠧ । 맮 
   ⠢  맮 㭪権,   atexit() ($$R.3.4).

  R.6.8 襭 筮

   筮  ࠬ⨪ 몠, 
  -ࠦ  ᠭ,  , -ࠦ,
  ᮤঠ騩  ᠬ  ࠦ  ८ࠧ ⨯,
    㭪樮쭮 ⨫ ($$R.5.2.3),    ⫨稬 
  ᠭ,  ஬  ⥫ 稭  (.  ⠪ 
   ⠥ ᠭ.
       ࠧ襭 筮 ᫥ ᫥  ,
  ⮡ ।   ஬-ࠦ  ᠭ.
   ࠭ 筮   . ਬ, 
  T - -⮣-⨯ ($$R.7.1.6), ⮣ 

      T(a)->m = 7;       // -ࠦ
      T(a)++;            // -ࠦ
      T(a,5)<<c;         // -ࠦ

      T(*e)(int);        // ᠭ
      T(f)[];            // ᠭ
      T(g) = {1, 2 };    // ᠭ
      T(*d)(double(3));  // ᠭ

    ⠫ 砨 ।⠢ ᠭ. ਬ,

      T(a);         // ᠭ
      T(*b)();      // ᠭ
      T(c)=7;       // ᠭ
      T(d),e,f=3;   // ᠭ
      T(g)(h,2);    // ᠭ

     筮   ᨭ⠪᪠, ..  
  ࠧ襭    䠪,    -⨯  .
      㣮    ஬-ࠦ  ᠭ,
   ࠧ蠥 ॡ, ⮡ ᠭ 㭪樨  
  ($$R.6.3) ᮯ஢ -⨯, ਬ:

      void g()
      {
        int f();  // ᠭ
        int a;    // ᠭ
        f();      // -ࠦ
        a;        // -ࠦ
     }

  R.7 ᠭ

  ᠭ ᯮ  樨   䨪஢;
  易⥫쭮, ⮡  ᮯ஢ 뤥 ,
  ᮯ⠢塞  䨪஬. ᠭ  

         ᠭ:
                ᯥ䨪樨-ᠭ opt ᯨ᮪-⥫ opt ;
                ᠭ-asm
                ।-㭪樨
                ᯥ䨪-裡

  ⥫  ᯨ᪥-⥫ ($$R.8) ᮤঠ 뢠
  䨪.  ᯥ䨪樨-ᠭ  ⢮
  ⮫쪮  । 㭪権 ($$R.8.3)   ᠭ 㭪権.
  ᮪-⥫   , ⮫쪮  ᠭ  ($$R.9)
   ᫥ ($$R.7.2), ..  ᯥ䨪-ᠭ 
  ᯥ䨪-  ᯥ䨪-᫥.
   ᠭ-asm   $$R.7.3,  ᯥ䨪-裡
   $$R.7.4. ᠭ ந室  ।  
  ($$R.3.2), ࠢ   ਢ  $$R.10.4.

  R.7.1 䨪樨

   ᠭ  ᯮ짮 ᫥騥 ᯥ䨪樨:

          ᯥ䨪-ᠭ:
               ᯥ䨪--
               ᯥ䨪-⨯
               ᯥ䨪-fct
               ᯥ䨪-蠡-⨯
               friend
               typedef
          ᯥ䨪樨-ᠭ:
               ᯥ䨪樨-ᠭ opt ᯥ䨪-ᠭ

        ᫥⥫쭮 権 ᯥ䨪-ᠭ,
  , ,   ⨯, ࠧ  ᠭ 
  ᯥ䨪樨-ᠭ. ᫥⥫쭮   ᮣᮢ,
    . ਬ,

        typedef char* Pc;
        static Pc;        // 訡:  

   ᠭ static Pc  , ᪮  㪠
    ᪮ ६ ⨯ Pc. ⮡ 
  ६ ⨯ int   Pc, 室 
  ᯥ䨪-⨯ int, ⮡ ,  ()।
   Pc  typedef,    Pc    ⮢
  ᫥⥫쭮 権 ᯥ䨪-ᠭ, ਬ,

        void f(const Pc);      // void f(char* const)
        void g(const int Pc);  // void g(const int)

      ,  ᪮ signed, unsigned, long  short 
  㬮砭 ࠪ  int,  -typedef, 
   ᫥   ᫥ ᯥ䨪権 ⨯,
    ()।塞 , ਬ,

        void h(unsigned Pc);     // void h(unsigned int)
        void k(unsigned int Pc); // void k(unsigned int)

  R.7.1.1 䨪樨  

  䨪樨     ⠪:

        ᯥ䨪--:
             auto
             register
             static
             extern

     䨪樨 auto  register  ਬ ⮫쪮 
   ꥪ⮢,  ᠭ   ($$R.6.3),   ଠ
  ࠬ஢ ($$R.8.3).  ᥣ ᯥ䨪 auto 筠 
  ᯮ  , ⠪, auto ᯮ, ⮡  ⤥
  -ᠭ  -ࠦ ($$R.6.2).
     ᠭ register  ᠭ auto, ஥ ᪠뢠
  ࠭,  뢠 ६  ᯮ짮
  筮 ⥭ᨢ. ᪠   ந஢,  
   ॠ    ⮬ 砥,  
   ६.
     ᠭ ꥪ ⠥ ।, ᫨ ⮫쪮  
  ᮤন ᯥ䨪樨 extern  樠樨 ($$R.3.1).
     । ਢ  뤥  ᮮ⢥饣
  ࠧ  믮 ᮮ⢥饩 樠樨 ($$R.8.4).
     䨪樨 static  extern  ਬ ⮫쪮  
  ꥪ⮢  㭪権    ꥤ.  
  ⨬ ᠭ 㭪権  ᯥ䨪樥 static 
  ଠ ࠬ஢  ᯥ䨪樥 static  extern.
  ᪨ 童  뢠  $$R.9.4. 䨪
  extern ⨬  童 .
       ᯥ䨪樥 static  ७ 뢠.
  ꥪ, ᠭ  const,  ७ 뢠,
  ᫨ ⮫쪮   뫨 ᠭ  譥 .  
  ᯥ䨪樥 extern  譥 뢠, ᫨ ⮫쪮 ࠭
    뫮 ᠭ  ७ .   䠩 
     ᯥ䨪樨--  譥
  뢠, ᫨ ⮫쪮 ࠭   뫮 ᠭ  ७
     ᯥ䨪樥 const.  ᫥ 뢠  㭪権,
    童, ᯥ䨪 inline ⭠ static
  ($$R.3.3).      ᯥ䨪樨, ।騥
  뢠,   ᮣᮢ. ਬ,

     static char* f();     // f()  ७ 뢠
     char* f()             // f()   ७
        { /* ... */ }

     char* g();            // g()  譥 뢠
     static char* g()      // 訡: ⨢稥  뢠
        { /* ... */ }

      static int a;        // `a'  ७ 뢠
      int a;               // 訡: ஥ ।

      static int b;        // `b'  ७ 뢠
      extern int b;        // `b'   ७

      int c;               // `c'  譥 뢠
      static int c;        // 訡: ⨢稥  뢠

      extern int d;        // `d'  譥 뢠
      static int d;        // 訡: ⨢稥  뢠

       ।   ᯮ짮  ᠭ
  extern. , ⠪ ᠭ  ᯮ짮 ०, 祬
   㤥 ।, ਬ,

      struct S;
      extern S a;
      extern S f();
      extern void g(S);

      void h()
      {
        g(a);    // 訡: S ।
        f();     // 訡: S ।
      }

  R.7.1.2 䨪樨 㭪権

   ᯥ䨪樨  ᯮ짮 ⮫쪮  ᠭ 㭪権.

      ᯥ䨪-fct:
           inline
           virtual

    䨪 inline ᪠뢠 ࠭,  室
  ந ⠭ ⥫ 㭪樨  筮 ॠ樨
  맮 㭪樨. ᪠  ஢.  砥 㭪権,
    童, ᯥ䨪 inline ⥫쭮 ⠭
   㭪樨 ७ 뢠 ($$R.3.3). 㭪 ($$R.5.2.2,
  $$R.8.2.5), ।  ᠭ ,   㬮砭
  ᯥ䨪 inline.
     㭪-童  ᯥ䨪樥 inline    筮
  ⠪  ।    ࠭樨,   .
     㭪-童  易⥫쭮  뢠  ᯥ䨪樥
  inline  ᠭ , ⮡  ࠪ⮢  ⠭.
  ᫨ ᯥ䨪樨 inline  뫮, 뢠 㤥 譨,
  ᫨ ⮫쪮 ।  ᯥ䨪樥 inline   ।
   맮 㭪樨.

       class X {
       public:
         int f();
         inline int g();    // X::g()  ७ 뢠
         int h();
       };

       void k(X* p)
       {
         int i = p->f();    // ⥯ X::f() 譥 뢠
         int j = p->g();
         // ...
       }

      inline int X::f()    // 訡: 맮  ।
                           //  inline
      {
        // ...
      }

     inline int X::g()
     {
       // ...
     }

     inline int X::h()     // ⥯ X::h()  ७ 뢠
     {
       // ...
     }

     䨪 virtual  ᯮ짮 ⮫쪮  ᠭ
  ᪨ 㭪権-童  ᠭ  (. $$R.10.2).

  R.7.1.3 䨪 typedef

  ᠭ  ᯥ䨪樥 typedef  䨪, 
    ᯮ짮  祭 ᭮ 
  ந ⨯. 䨪 typedef ⨬  ।-㭪樨
  ($$R.8.3).
      -typedef:
            䨪
   ।   ($$R.3.2) ᠭ typedef 
  䨪, 騩     ⥫,
  ⠭ ᨭ⠪᪨  㦥 ᫮  砥 ⨯,
  易   䨪஬,  ᠭ  $$R.8.  ࠧ,
  -typedef  ᨭ 㣮 ⨯.  ⫨稥  ᠭ
   ($$R.9.1) -typedef    ⨯. ਬ,
  ᫥ ᠭ

          typedef int MILES, *KLICKSP;

  樨

      MILES distance;
      extern KLICKSP metricp;

   묨 ᠭﬨ, ⨯ distance  int,   metricp
  ⨯ "㪠⥫  int".
       typedef  ८।  ⠪, ⮡  
  砫 ⨯,   㦥 뫠, 祬   ⮩ 
  ,  ன ⨯  ࢮ砫쭮 ᠭ, ਬ,

       typedef struct s { /* ... */ } s;
       typedef int I;
       typedef int I;
       typedef I I;

    ﭭ ,  ।  typedef, 砥 
  ⢥ ᢮  , ᯮ짮  typedef, ਬ,

       typedef struct { /* .... */ } S; //   ⠫ S

      ᠭ typedef  ८।  ⨯,
  ᠭ  ⮩   , ⠪, ⮡  砫
  㣮 ⨯, ਬ,

      class complex { /* ... */ };
      typedef int complex;   // 訡: ८।

    筮,  뢠    ⨯, ᠭ
   ⮩   , ⠪, ⮡  砫 㣮
  ⨯, ਬ,

      typedef int complex;
      class complex { /* ... */ };  // 訡: ८।

    -typedef, ஥ 砥 ,  -
  ($$R.9.1).   ᯮ짮 ᫥ ᫥ 䨪ᮢ:
  class, struct  union,  ⠪   ஢ 
  ஢  ᠭ ᠬ , ਬ,

      struct S {
          S();
         ~S();
      };

      typedef struct S T;
      S a = T();    // ଠ쭮
      struct T* p;  // 訡



  R.7.1.4 䨪 蠡 ⨯

  䨪 蠡 ⨯ ᯮ   ᥬ⢠ ⨯
   㭪権 (. $$R.14).

  R.7.1.5 䨪 friend

  䨪 friend ᯮ   㯠  童 
  (. $$R.11.4).

  R.7.1.6 䨪 ⨯

   ᯥ䨪樨 ⨯ ⭮:

       ᯥ䨪-⨯:
           -⮣-⨯
           ᯥ䨪-
           ᯥ䨪-᫥
           ᯥ䨪-᫮-⨯
           :: -
           const
           volatile

   ᠭ ꥪ 㦥 ᫮ const  volatile  
     ᯥ䨪樨-⨯.   㣨   ᠭ
   ⢮    ᯥ䨪樨-⨯. ꥪ 
  ᯥ䨪樥 const  樠஢,   祭 
     쭥襬. ꥪ  ᯥ䨪樥 const, ᫨
  ⮫쪮     ᠭ  extern,   譥
  뢠   樠஢ ($$R.8.4, $$R.12.1). 
   ᯥ䨪樥 const, 樠஢ ࠦ-⠭⮩,
   ᯮ짮  ࠦ-⠭ ($$R.5.19). 
   ᨢ  ᯥ䨪樥 const    ᯥ䨪,
    ᪨ 童,  騩 㭪樥,  ꥪ 
   ᯥ䨪樥 const ᠬ ⠥ const ($$R.9.3.1). ꥪ ⨯
     ,   ᯥ䨪 const,
    饭  , 㯭 ⮫쪮  ⥭. ⪠
      ⠪ ꥪ  ਢ  ᮡ ᭮
  樨,  ன ᫥,  ᫨  ꥪ  
  ᯥ䨪樨 const.
         饣  ॠ樨 ᭥ ꥪ⮢ 
  ᯥ䨪樥 volatile.  㦨 ᪠ ࠭ 
  ᫨誮 ⨢ ⨬樨, 易  ⨬ ꥪ⮬, ᪮
  祭 ꥪ   ᯮᮡ, 묨 
  ࠭.   ᨢ  ᯥ䨪樥 volatile
     ᯥ䨪   ᪨ 童,  騩
  㭪樥,  ꥪ   ᯥ䨪樥 volatile ᠬ ⠥
  volatile ($$R.9.3.1).
     ᫨ ᯥ䨪-⨯   ᠭ,  ⠥
    int.

       -⮣-⨯:
             --
             筥--⨯
             char
             short
             int
             long
             signed
             unsigned
             float
             double
             void

    int     㦥 ᫮ long
   short.   ᯮ짮  窥, ⮣ ⠥,
   ⨯  int. 㦥 ᫮ long    
  double.   char, short, int  long   
   㦥 ᫮ signed  unsigned.  
  ᯮ짮  窥, ⮣ ⠥,  ⨯  int.
  䨪 signed 㪠뢠,  ꥪ ⨯ char  ⮢
    묨,  㣨 楫᫥ ⨯ 
  ᯥ䨪 筠.
      樨 ᯥ䨪-  ᯥ䨪-᫥
  ।  $$R.9  $$R.7.2 ᮮ⢥⢥.

       ᯥ䨪-᫮-⨯:
             㦥-᫮- -
             㦥-᫮- 䨪

       㦥-᫮-:
             class
             struct
             union

     ᫨  䨪, ᯥ䨪-᫮-⨯ 뢠
    - (. $$R.9.1).
     ᫨ । , ஥ 뢠   ᯥ䨪樨
  union,     ।  ꥤ. ᫨ ।
  , ஥ 뢠   ᯥ䨪樨 class,   
   ।   ᯥ䨪権 class  struct. ᫨
  । , ஥ 뢠   ᯥ䨪樨 struct,
     ।   ᯥ䨪樨 class 
  struct.   ⨯ ($$R.9.7)   
  ꥬ饣 :

            筥--⨯:
                 -typedef
                 - :: 筥--⨯

            --:
                 筥--
                 :: 筥--

            筥--:
                 -
                 - :: 筥--

  , 筥 -   ⨯, । 
  ⮬      ⮣ .  筮, ,
  ᠭ  ந ,  묨 童  ⨬
     ᮢ (. $$R.3.2).

  R.7.2 ᠭ ᫥

  ᫥  ⤥ 楫᫥ ⨯ ($$R.3.6.1)
   ⠭⠬-.    ᢮   ⠭
  樥 -᫥, .. 㦨 १ࢨ஢ ᫮.

            -᫥:
                䨪

            ᯥ䨪-᫥:
                enum 䨪 opt { ᯨ᮪-᫥ }

            ᯨ᮪-᫥:
                -᫥
                ᯨ᮪-᫥ , -᫥

            -᫥:
                䨪
                䨪 = ࠦ-⠭
   䨪  ᯨ᪠-᫥  ᠭ묨
   ⠭    ,  ॡ ⠭.
  ᫨  뫮 ⮢ ᫥  =,  祭 ⠭
  稭    ᫥⥫쭮 㢥稢  
    த  ᯨ᪥ ᫥ ࠢ. ᫨ 
  ᫥ ⨫  =,   䨪 ਭ 
  祭,  ᫥騥 䨪  樠饩 
    騥 祭, 稭  . 祭
   ᫥   ⨯ int  祭, ஥
   ਢ  int   ⠭ 楫᫥
  ८ࠧ ($$R.4.1).
      ⮢ ᫥   ⫨   
  ६  㣨 ⮢ ᫥ ⮩  
  . 祭 ⮢ ᫥  易 ⫨
    㣠. ⠥,   ᫥ ᠭ  
    䨪  樠饣 祭,
  (᫨  ). ਬ,  ।

        enum { a, b, c=0 };
        enum { d, e, f=e+2 };

  祭 a, c,  d   0, b  e  1,  f  3.
       ᫥  楫᫥ ⨯, 
  ⫨祭   㣨 楫᫥ ⨯.   ᫥
  ⠥  ᫥. 祭  ᫥ 
  ꥪ ⨯ ᫥ ८ࠧ  楫  
  ⠭ 楫᫥ ८ࠧ ($$R.4.1). ਬ,
   ᫥饬 ࠣ:

        enum color { red, yellow, green=20, blue };
        color col = red;
        color* cp = &col;
        if (*cp == blue ) // ...

  color   楫᫥ ⨯, 뢠騩 ࠧ 梥,
  col ᠭ  ꥪ ⮣ ⨯,  cp  㪠⥫  ꥪ
  ⮣ ⨯. 묨 祭ﬨ ꥪ ⨯ color 
  red, yellow, green, blue.  祭  ८ࠧ
   楫 祭 0, 1, 20  21. ᪮  ᫥ - 
  ⤥ ⨯, ꥪ ⨯ color  ᢠ ⮫쪮 祭
  ⨯ color, ਬ,

      color c = 1;    // 訡: ᮮ⢥⢨ ⨯
                      //  ८ࠧ  int  color

      int i = yellow; // ଠ쭮: yellow ८ࠧ  int  祭 1
                      // ⠭⭮ 楫᫥ ८ࠧ

   ⠪  $$R.18.3.
      ᫥, ।   ($$R.9), ⭮
     ⮣ ,      
  㭪権-童 ⮣  ⮫쪮    筥
    ($$R.5.1).  ᠬ ⨯ ᫥ 쭮
   ⮬  ($$R.9.7), ਬ,

        class X {
        public:
            enum direction { left='l', right='r' };
            int f(int i)
                { return i==left ? 0 : i==right ? 1 : 2; }
        };

        void g(X* p)
        {
          direction d;        // 訡: `direction' 
          int i;              //  
          i = p->f(left);     // 訡: `left' ⮦ 
          i = p->f(X::right); // ଠ쭮
          // ...
        }

  R.7.3 ᠭ asm

  ᠭ asm  :

         ᠭ-asm:
             asm ( ப-ࠫ) ;

  祭 ᠭ asm । ॠ樥. 筮 
  ᯮ  । ଠ樨  ࠭  ᥬ.

  R.7.4 䨪樨 裡

    ᯥ䨪樨-裡  易 ($$R.3.3) ࠣ
  ணࠬ  ++   㣮 몥:

       ᯥ䨪-裡:
           extern ப-ࠫ { ᯨ᮪-ᠭ opt }
           extern ப-ࠫ ᠭ

       ᯨ᮪-ᠭ:
           ᠭ
           ᯨ᮪-ᠭ ᠭ

  ॡ㥬 뢠    ப-ࠫ.  祭
  । ॠ樥.    ॠ  
  ।ᬮ७ 뢠  㭪樥  몥  ("")   㭪樥
   몥 ++ ("++").  㬮砭 뢠   "++",
  ਬ,

        complex sqrt(complex);   //  㬮砭 뢠  C++
        extern "C" {
            double sqrt(double); // 뢠  C
        }

     䨪樨 裡   묨. 䨪 裡
     . 䨪-裡  
  ⮫쪮  䠩   ($$R.3.2). 䨪-裡
    ⭮  ꥪ⠬, ᠭ  ,  㭪, 
  騬 童. 䨪-裡, ⭮  ன
  㭪樨, ⭮   ᥬ ꥪ⠬  㭪, ᠭ  .
  ᠭ 裡, ᮤঠ饥   ॠ樨 ப,
  ⠥ 訡.
     ᫨ 㭪    ᯥ䨪樨-裡,   
   ᮣᮢ, ..      ப-ࠫ.
  ᠭ 㭪樨  㪠 ᯥ䨪樨-裡  
  ।⢮ ࢮ 㪠 ᯥ䨪樨 裡  ⮩ 㭪樨.
  㭪   ᠭ  㪠 ᯥ䨪樨 裡 
  ᫥  㪠 ᯥ䨪樨 裡,  뢠,  
    ࠭ ᠭ,  㤥 ࠭ ⠪ ᠭ 㭪樨.
      ⢠ ॣ㦥 㭪権 ($$R.13)   
       뢠  몮 , . $$R.7.4.
     뢠  ⠭  ꥪ⮢, ਬ:

       extern "C" {
          // ...
          _iobuf_iob[_NFILE];
          // ...
          int _flsbuf(unsigned,_iobuf*);
          // ...
       }

    ᯥ䨪 裡,  㭪樨  ꥪ   
  ᪨  { }.  ⠪ 㭪権  ꥪ⮢ 
  뢠 . , 㭪, ᠭ   裡,
  ࠪ,  ᫨   뫠  ᠭ  extern, ਬ,
   ஥ ᠭ 訡筮 ($$R.7.1.1):

       extern "C" double f();
       static double f();     // 訡

  ꥪ, ᠭ  樨

       extern "C" {  /* ... */ }

    ⠥ ।,    ᠭ.
      뢠 ꥪ⮢  ++  ꥪ⠬, ।묨  㣨
  몠, ⠪    ⭮ 뢠,   몮 
  ॠ樨.  뢠  ⮫쪮  ⮬ 砥, 
   ࠧ饭 ꥪ⮢    筮 宦
    몮.
      ᫨   裡  ப-ࠫ  ᯥ䨪樨-裡
  ᯮ  몠 ணࠬ஢,  ४, ⮡
  ᠭ ⮣  ஢  㬥, ।饣 
  , ਬ, Ada (  ADA)  Fortran (  FORTRAN).

  R.8 ⥫

  ᮪-⥫, 䨣騩  ᠭ, -  ᫥⥫쭮
  १  ⥫,     
  樠.

        ᯨ᮪-ᠭ:
             ⥫--樠஬
             ᯨ᮪-ᠭ , ⥫--樠஬

        ⥫--樠஬:
             ⥫ 樠 opt

  ᠭ ⮨   ⥩: ᯥ䨪樨 (ᯥ䨪-ᠭ;
  . $$R.7.1)  ⥫ (ᯨ᮪-⥫). 䨪樨 
  ᭮ ⨯,    㣨 ᢮⢠ 뢠 ꥪ⮢
   㭪権. ⥫    ꥪ⮢  㭪権,  ⠪,
  ,  ⨯   ⠪ 権,  * (㪠⥫ )
   () (㭪 ).  ⥫ ⠪   砫
  祭, 樠 㦤  $$R.8.4   $$R.12.6.
      ⥫  ⠪ ᨭ⠪:

      ⥫:
        --⥫
        -ptr ⥫
        ⥫ (ᯨ᮪-ᠭ-ࠬ஢) ᯨ᮪-ᯥ䨪権-cv opt
        ⥫ [ ࠦ-⠭ opt]
        ( ⥫ )

     -ptr:
        * ᯨ᮪-ᯥ䨪権-cv opt
        & ᯨ᮪-ᯥ䨪権-cv opt
        -- :: * ᯨ᮪-ᯥ䨪権-cv opt

     ᯨ᮪-ᯥ䨪権-cv:
        const
        volatile

     --⥫:
         
         -
         ~-
         -typedef
         筥--⨯

   -  । 祭  ᠭ
    ⨬ ,   ᯮ  筥  樨 ::
   ࠧ襭     ($$R.12.1, $$R.12.4).

  R.8.1  ⨯

   ⨯ 室 㪠뢠   樨 
  ८ࠧ ⨯   ⢥ ࠬ   sizeof
   new.  ⮣ 㦨  -⨯,  ᨭ⠪᪨
  ⭠ ᠭ ꥪ  㭪樨 ⮣ ⨯,  ஬
    ꥪ  㭪樨.

       -⨯:
         ᯨ᮪-ᯥ䨪権-⨯ ࠪ-⥫ opt

       ᯨ᮪-ᯥ䨪権-⨯:
         ᯥ䨪-⨯ ᯨ᮪-ᯥ䨪権-⨯

       ࠪ-⥫:
         -ptr ࠪ-⥫ opt

ࠪ-⥫ opt ( ᯨ᮪-ᠭ-ࠬ஢ ) ᯨ᮪-ᯥ䨪権 cv opt
         ࠪ-⥫ opt [ ࠦ-⠭ opt ]
         ( ࠪ-⥫ )

   筮 㪠,    ࠪ⭮-⥫
  㦭  䨪, ⮡  ⠫ ⥫,
  ⨬  ᠭ.   ⨯ 㤥 ⥬ ,  
  ⨯ ᪮ 䨪. ਬ, ᠭ

          int             // int i
          int *           // int *pi
          int *[3]        // int *p[3]
          int (*)[3]      // int (*p3i)[3]
          int *()         // int *f()
          int (*)(double) // int (*pf)(double)

   ᮮ⢥⢥ ⠪ ⨯: "楫", "㪠⥫  楫",
  "ᨢ  3 㪠⥫  楫", "㪠⥫  ᨢ  3 楫",
  "㭪  ࠬ஢,  㪠⥫  楫",
  "㪠⥫  㭪  ࠬ஬ ⨯ double,  楫".

  R.8.1.1 ࠭ 筮

  筮, ⬥祭  $$R.6.8,   - 室⢠
   ਢ,   㭪樮쭮 ⨫,  ᠭ,
   ⠪   ⥪ ᠭ.  ⮬ ⥪ 
    室⢮  ᠭ 㭪樨,  ஬ 
   ᪮   ࠬ,  ᠭ ꥪ, 
  ஬  ⢥ 樠 ᯮ  ਢ,
    㭪樮쭮 ⨫.    ஢, 筮
  ࠭ ࠢ, ᮣ᭮ ஬ ᫥  ᠭ 
  ,   㦨 ⠪.   ࠭
  筮  ᠭ    ਢ,   
  㭪樮쭮 ⨫,    樨 =  祭
  樠樨, ਬ,

       struct S {
          S(int);
       };

      void foo(double a)
      {
        S x(int(a));   // ᠭ 㭪樨
        S y((int)a);   // ᠭ ꥪ
        S z = int(a);  // ᠭ ꥪ
      }

  R.8.2  ⥫

  ᮪ ⥫ ᫥ ᫥ ( ⮣) ᯨ᪠
  ᯥ䨪権-ᠭ ($$R.7.1).  ⥫ ᮤন  筮
   --⥫, ஥  뢠 䨪.
  ᫨   ᠭ  ᯥ樠 㭪権 ($$R.12.3,
  $$R.13.4), --⥫   䨪஬.
  䨪樨 auto, static, extern, register, friend, inline, virtual
   typedef ⭮ ।⢥   --⥫ 
  ᯨ᪠ ⥫.   --⥫ । 
  ᯥ䨪樥-ᠭ ($$R.7.1), ⠪   ⥫.
        ࠧ, ᠭ ண 䨪  

           T D

   T 砥 ⨯,  D - ⥫. ᫨  ᠭ D 
  䨪  ᪮,  ⨯ ⮣ 䨪  T.
        ᠭ,  D  

           ( D1 )

  ⨯ D1 ⠪ ,   ⨯ D. 稥 ᪮   ⨯ 祭
    --⥫,   ᫮ ⥫   
   冷 ਬ 権.

  R.8.2.1 ⥫

   ᠭ T D,  ஬ D  

        * ᯨ᮪-ᯥ䨪権-cv opt D1

  ⨯ 뢠 䨪 
  "... ᯨ᮪-ᯥ䨪権-cv 㪠⥫  T". 
  ᯨ᮪-ᯥ䨪権-cv ⭮  㪠⥫,    㪠㥬
  ꥪ.
     ਬ,  ᠭ

        const ci = 10, *pc = &ci, *const cpc = pc;
        int i *p, *const cp = &i;

  ।: ci  ⠭ 楫; pc  㪠⥫  ⠭
  楫; cpc  ⠭ 㪠⥫  ⠭ 楫; i  楫;
  p  㪠⥫  楫;  cp  ⠭ 㪠⥫  楫.
  ᫥ 樠樨 祭 ci, cpc  cp    .
  祭 pc   ⠪ ,   祭 ꥪ,  
  㪠뢠 cp. ਢ ਬ ⨬ 権:

        i = ci;
        *cp = ci;
        pc++;
        pc = cpc;
        pc = p;

  ⨬ ᫥騥 樨:

        ci = 1;    // 訡
        ci++;      // 訡
        *pc = 2;   // 訡
        cp = &ci;  // 訡
        cpc++;     // 訡
        p = pc;    // 訡

     権 ⨬  ⮬,    祭
  ꥪ, ᠭ  ᯥ䨪樥 const,  ⮬,  
  ⠪      㪠⥫, ஥
   ꥪ  ᯥ䨪樨 const.
      筠   ᯥ䨪樥 volatile.
        $$R.5.17  $$R.8.4.
       뢠 㪠⥫  뫪 ($$R.8.2.2)  㪠⥫
   ⮢  ($$R.9.6).

  R.8.2.2 뫪

   ᠭ T D,  ஬ D  

      & ᯨ᮪-ᯥ䨪権-cv opt D1

  ⨯ 뢠 䨪 
  "...ᯨ᮪-ᯥ䨪権-cv 뫪  T".  void& ⨬.
      ਬ,  ࠣ

      void f(double& a) { a += 3.14; }
      // ...
         double d = 0;
         f(d);

  a 뢠  ࠬ, 騩 뫪, ⮬ 맮
  f(d) ਢ  㢥祭 d  3.14.  ࠣ

      int v[20];
      // ...
      int& g(int i) { return v[i]; }
      // ...
      g(3) = 7;

  뢠: 㭪 g() 頥 뫪  楫; ⮬
   g() = 7; ᢮ 7 ⢥⮬  ᨢ v.
  ᬮਬ ᫥騩 ணࠬ ࠣ:

     struct link {
        link* next;
     };
     link* first;

     void h(link*& p)  // `p' 뫪  㪠⥫
     {
       p->next = first;
       first = p;
       p = 0;
     }

     void k()
     {
       link* q = new link;
       h(q);
     }

   p ᠭ  뫪  㪠⥫  link, ⮬ 맮 h(q)
    祭 q, ࠢ 0, . ⠪ $$R.8.4.3.
     ⨬ 뫪  뫪, 뫪  ⮢  ($$R.9.6),
  ᨢ 뫮  㪠⥫  뫪. ᠭ 뫪  ᮤঠ
  樠 ($$R.8.4.3),  ᪫祭  砥,  ᠭ
  ᮤন  ᯥ䨪 extern ($$R.7.1.1),   ᠭ
  童  ($$R.9.2)  ᠭ ᠬ ,  
  ᠭ ࠬ  頥 ⨯ ($$R.8.2.5),
  . ⠪ $$R.3.1.

  R.8.2.3 ⥫  童

   ᠭ T D,  ஬ D  
      -- :: * ᯨ᮪-ᯥ䨪権-cv opt D1
  ⨯ 뢠 䨪 
  "... ᯨ᮪-ᯥ䨪権-cv 㪠⥫  童  -- ⨯ T".
  ਬ,  ࠣ

       class X {
       public:
          void f(int);
          int a;
       };

       int X::* pmi = &X::a;
       void (X::* pmf)(int) = &X::f;

  pmi  pmf 뢠  㪠⥫  童 X ⨯ T  㪠⥫ 
  童 X ⨯ void(int) ᮮ⢥⢥.  ꥪ  ᯮ짮
  ⠪:

      X obj;
      // ...
      obj.*pmi = 7;   // ᢮ 7 童 obj ⨯ int
      (obj.*pmf)(7);  // 맢 㭪-童 obj
                      //  ࠬ஬ 7

     ⬥⨬,  㪠⥫  童  ந  ᪨
  童  ($$R.9.4), . ⠪ $$R.5.5  $$R.5.3.

  R.8.2.4 ᨢ

   ᠭ T D,  ஬ D  

      D1 [ ࠦ-⠭ opt ]

  뢠 䨪 ⨯ " ... ᨢ T". ᫨
  ࠦ-⠭  ($$R.5.19),    
  楫᫥ ⨯  祭, 襥 0.  ࠦ  ᫮
  ⮢ ᨢ. ᫨ 祭 ࠦ-⠭  N, 
  ᨢ  N ⮢  ᠬ  0  N-1.
     ᨢ  ࠧ뢠 :   ᭮ ⨯ ( ᪫祭
  void), 㪠⥫, 㪠⥫  童, , ᫥  
  㣮 ᨢ.
     ᫨   ᪮쪮 ᯥ䨪権 "ᨢ ...", ࠧ
   ᨢ, 祬 ࠦ-⠭, 饥 ࠭
  ᨢ,  ⢮ ⮫쪮  ࢮ ᨢ.  㬮砭
    砥 ࠬ஢ 㭪樨 ⨯ ᨢ,  ⠪  ᨢ
   譨,   ।,   易 १ࢨ஢
  , 室  㣮 . ࢮ ࠦ-⠭ 
   ய饭   ⮬ 砥, ᫨  ⥫ ᫥
  ᯨ᮪-樠஢ ($$R.8.4).  ࠧ ᨢ ।
  ᫮ ⮢, ਢ  樠 ($$R.8.4.1).
       ᠭ

          float fa[17], *afp[17];

  ᠭ ᨢ ᥫ ⨯ float  ᨢ 㪠⥫  ᫠ ⨯ float,
    ᠭ

          static int x3d[3][5][7];

  ᠭ ᪨ 嬥 ᨢ 楫 ࠧ 3x5x7. ண
  , x3d  ᨢ   ⮢,   
   ᨢ   ᨢ,    ᫥  ᨢ
   ᥬ 楫.  ࠦ ⨬    ᫥
  ࠦ: x3d, x3d[i], x3d[i][j], x3d[i][j][k].
      ᫨  ࠦ  䨪 ⨯ ᨢ, , ᪫
  砨 ࠭   sizeof  &  樠 
  뫪 ($$R.8.4.3),  ⨯ ८ࠧ  㪠⥫  
   ᨢ. ᬮ   ८ࠧ, ᨢ  
  塞묨 ᠬ. ᫨   砩 ᯮ짮 ᨢ
   ᠭ  ($$R.13.4.5),  樨 ।
  ⠪,  E1[E2] ᮢ  *((E1) + (E2)).  ⮬ ࠢ
  ८ࠧ ⨯  樨 +, ᫨ E1  ᨢ,  E2
  楫,  E1[E2] 㪠뢠  E2-  E1. ⮬, ᬮ
   ᢮ ᨬ ,  - ⨢ .
      筮 ࠢ     ᨢ. ᫨
  E - n- ᨢ ࠧ ixjx...xk,   ࠦ 
  ८ࠧ  㪠⥫  (n-1)- ᨢ ࠧ jx...xk.
  ᫨  ⮬ 㪠⥫     १ 樨 ਬ
   *, 㪠㥬 (n-1)- ᨢ ᠬ  ८ࠧ
   㪠⥫.
      ਬ, ᬮਬ ᠭ

      int x[3][5];

   ᠭ ᨢ  3x5 楫. ᫨  ࠦ  x, 
   ८ࠧ  㪠⥫   ᨢ   楫.
  ᫨  ࠦ  x[i],  ⭮ *(x+i),  砫
  x ८ࠧ  㪠⥫,  뫮 ᪠ , ⥬ x+i
  ८ࠧ  ⨯ x,  祣 室 i 㬭  ࠧ ꥪ,
    㪠뢠 x, ..  ࠧ  楫. ⥬ ந室
  ᫮  ਬ ᢥ, ᫥ 祣 稬 ᨢ ( 
  楫),   ᢮ । ८ࠧ  㪠⥫  ࢮ 
  楫. ᫨    ,  ,    ࠧ
   稬  १ 楫.
      ᥣ ⮣ ᫥,  ᨢ  ++ ࠭  ப
  (᫥   ॥ ᥣ),  祭 ࢮ
    ᠭ  ᫨ ࠧ , 室
   ᨢ,   ᫥ ᭮ ࠦ  
  ஫  ࠥ.

  R.8.2.5 㭪樨

   ᠭ T D,  ஬ D  

     D1 (ᯨ᮪-ᠭ-ࠬ஢ ) ᯨ᮪-ᯥ䨪権-cv opt

  뢠 䨪  ⨯
  "...ᯨ᮪-ᯥ䨪権-cv 㭪  ࠬࠬ ⨯
  ᯨ᮪-ᠭ-ࠬ஢  T".

     ᯨ᮪-ᠭ-ࠬ஢:
          ᯨ᮪-ᠭ-ࠬ opt ... opt
          ᯨ᮪-ᠭ-ࠬ , ...

     ᯨ᮪-ᠭ-ࠬ:
          ᠭ-ࠬ
          ᯨ᮪-ᠭ-ࠬ , ᠭ-ࠬ

     ᠭ-ࠬ:
          ᯥ䨪樨-ᠭ ⥫
          ᯥ䨪樨-ᠭ ⥫ = ࠦ
          ᯥ䨪樨-ᠭ ࠪ-⥫ opt
          ᯥ䨪樨-ᠭ ࠪ-⥫ opt = ࠦ

     ᫨ ᯨ᮪-ᠭ-ࠬ஢ 蠥 ᮬ (...),
   ᫮ ࠬ஢ ⭮ ⮫쪮 ,     ࠢ
  ᫠  ࠬ஢, ᫨ ᯨ᮪ ࠬ஢ ,  㭪
  ࠬ஢  . ᮪ ࠬ஢ void ⥭ ⮬
  ᯨ ࠬ஢.   ⮣ , void    ⨯
  ࠬ ( ⨯, 砥  void, ⠪  void*, ⨬).


  R.8.3 । 㭪権

  । 㭪権  

    ।-㭪樨:
  ᯥ䨪樨-ᠭ opt ⥫ 樠-ctor ⥫-㭪樨

    ⥫-㭪樨:
       ⠢-

   ⥫  ।-㭪樨  ᮤঠ ⥫
  

       D1 ( ᯨ᮪-ᠭ-ࠬ஢ ) ᯨ᮪-ᯥ䨪権-cv  opt

   ᮮ⢥⢨  ।ﬨ  $$R.8.2.5
       ଠ ࠬ ⭮    ᠬ
  讣  ⥫-㭪樨.
      ਢ ਬ  । 㭪樨.

        int max( int a, int b, int c)
        {
          int m = (a > b) ? a : b;
           return (m > c) ? m : c;
        }

   int ।⠢ ᯥ䨪樨-ᠭ, max(int a, int b, int c)
  - ⥫,  { /* ... */ } - ⥫-㭪樨.
      樠-ctor ᯮ ⮫쪮  ,
  . $$R.9.3.1  $$R.12.6.
      ᯨ᮪-ᯥ䨪権-cv  ⢮:
   ᠭ ᪮ 㭪樨-童,  । ᪮
  㭪樨-童   ᠭ 㪠⥫  㭪-童, . $$R.9.3.1.
   ⭮  ⨯ 㭪樨.
     ⬥⨬,  ᯮ㥬 ଠ ࠬࠬ  
   , ਬ,

       void print(int a, int)
       {
         printf("a = %d\n",a);
       }

  R.8.4 樠

   ⥫   砫쭮 祭 뢠 䨪.

     樠:
           = ࠦ-ᢠ
           = { ᯨ᮪-樠஢ , opt }
           ( ᯨ᮪-ࠦ )

     ᯨ᮪-樠஢:
           ࠦ-ᢠ
           ᯨ᮪-樠஢ , ࠦ-ᢠ
           { ᯨ᮪-樠஢ , opt }

    ⮬᪨, ॣ஢, ᪨  譨 ६
   樠஢ ந묨 ࠦﬨ, ᮤঠ騬
  ⠭  ᠭ ࠭ ६  㭪樨.

       int f(int);
       int a = 2;
       int b = f(a);
       int c(b);

    ⥫ ⨯ const T*, .. 㪠⥫  ⠭ T, 
  樠஢ 㪠⥫ ⨯ T*,  樠  㪠⥫
   ⭮ 浪 . ꥪ ⨯ T  樠஢
  ꥪ⠬ ⨯ T ᨬ  ᯮ짮 ᯥ䨪権 const 
  volatile  ⨯ 樠㥬 ६  樠,
  ਬ,

       int a;
       const int b = a;
       int c = b;

       const int* p0 = &a;
       const int* p1 = &b;
       int* p2 = &b;        // 訡: 㪠⥫  const
                            // ࠨ  ꥪ const
       int *const p3 = p2;
       int *const p4 = p1;  // 訡: 㪠⥫  const
                            // ࠨ  ꥪ const
       const int* p5 = p1;

   稭  訡 : ᫨   樠,
       㪠⥫  ᮮ⢥饩
  ᯥ䨪樨 祭 祣-,  뫮 ᠭ  const.
      ࠦ  ⠭ 祭 ࠬ஢ 뢠
   ࠭祭, . $$R.8.2.6.
    樠 ꥪ⮢ ᮢ   ஢ 뢠
   $$R.12.6.1. ஢ ꥪ⮢ ᮢ 뢠  $$R.12.8.
  冷 樠樨 ᪨ ꥪ⮢ ।  $$R.3.4
   $$R.6.7.
    ࠭,  ६ ᪮   ($$R.3.5),
    뫨 樠஢,  ⢥ 砫쭮 祭
   0, ਢ  㦭 ⨯.   ࠢ  ᪨
  童 ꥪ⮢ . 砫 祭 ⮬᪨ 
  ॣ஢ ६,   뫨 樠஢, ।.
    ᫨ 樠 ⭮  㪠⥫  ꥪ 䬥᪮
  ⨯,  ⮨   ࠦ (  ᪮).  ⢥
  砫쭮 祭 ꥪ  祭 ࠦ, ந室
  ⠪  ८ࠧ ⨯,    砥 ᢠ.
    ⨬,  ᪮ ()   樠஬,
  ᠭ

      X a();

    ꥪ a ⨯  X,   ᠭ 㭪樨 
  ࠬ஢, 饩 X.
     樠  ᪮ 童 ਭ 
   童 , ਬ,

        int a;

        struct X {
           static int a;
           static int b;
        };

        int X::a = 1;
        int X::b = a;  // X::b = X::a

  R.8.4.1 ॣ

  ॣ⮬ 뢠 ᨢ  ꥪ ⨯  ($$R.9),  騩
  ஢ ($$R.12.1),   饭 童 ($$R.11),
   ᮢ ($$R.10)  㠫 㭪権 ($$R.10.2). ᫨
  ॣ 樠,  樠஬  
  ᯨ᮪-樠஢,  ⮨  祭  䨣
  ᪮ ᯨ᪠, ࠧ 묨, 樠஢  童
  ॣ. 樠   饬 浪 ᮢ 
  童 ॣ. ᫨ ॣ ᮤন  ॣ, 
  ࠢ ਬ ४ᨢ  童  ॣ⮢. ᫨
  樠஢  ᯨ᪥ , 祬 童 ॣ,  
   㫥묨 祭ﬨ ᮮ⢥ ⨯.
      ਬ,  ᫥饬 ࠣ

         struct S { int a; char* b; int c; }
         S ss = { 1, "asdf" };

  ss.a 樠 祭 1, ss.b - "asdf",  ss.c - 0.
      ஬ ⮣, ॣ, 騩 ᮬ,  樠஢
  ꥪ⮬ ⮣   , 饣 騬 ந
    ($$R.12.8).
       ᪮ ࠧ ᫥騬 ࠧ. ᫨
  ᯨ᮪-樠஢ 稭  䨣୮ ᪮, 
  ᯨ᮪ 樠஢, ࠧ 묨, 
  祭 童 ॣ, 祬 ⠥ 訡, ᫨
  樠஢ , 祬 童. , ᫨ ᯨ᮪-樠஢
    ॣ  稭  䨣୮ ᪮, 
   ᯨ᪠ ᯮ ⠪ ᫮ ⮢, ஥ 㦭 
  樠樨 童 ⥪饣 ॣ;  ⠢訥 
  ᯮ  樠樨 童 ᫥饣 ॣ,  
   ⥪騩 ॣ.
     ਬ,  ।

         int x[] = { 1, 3, 5 };

  ᨢ x 樠   ᨢ   ⮢,
  ᪮ ࠧ ᨢ  㪠,  ਢ  樠.
     ਢ ਬ 樠樨   ᪮筮 ன.

         float y[4][3] = {
            { 1, 3, 5 },
            { 2, 4, 6 },
            { 3, 5, 7},
         };

   祭 1, 3, 5 樠  ப ᨢ y[0],
  .. y[0][0], y[0][1]  y[0][2]. 筮, ᫥騥  ப
  樠 y[1]  y[2]. 樠 ਢ  ,
  ⮬ y[3] 樠 ﬨ. 筮 ⠪  १
      ⠪ 樠樨:

         float y[4][3] = {
            1, 3, 5, 2, 4, 6, 3, 5, 7,
         };

  ᫥ (ᠬ ࠢ)   ॥ ᥣ.
       ᫥ ਬ 樠  y 稭  䨣୮
  ᪮,   y[0] ᪮  , ⮬  ᯨ᪠ ᯮ
   , ⠪   ᫥⥫  ᯮ 
  y[1]  y[2].  ᫥饬 ਬ

         float y[4][3] = {
         { 1 }, { 2 }, { 3 }, { 4 }
         };

  樠  ⮫ y ( ᬠਢ 
  㬥 ᨢ),  ⠫ ⮫ ਭ 祭 0.
       樠 ᨢ ꥪ⮢ ⨯    ஢
  뢠  $$R.12.6.1.
       樠  ꥤ    
   ⤥ ࠦ ⨯ ꥤ,  祭  䨣
  ᪮, 樠஬ ࢮ 童 ꥤ, ਬ,

         union u { int a; char* b; };

         u a = { 1 };
         u b = a;
         u c = 1;             // 訡
         u d = { 0, "asdf" }; // 訡
         u e = { "asdf" };    // 訡

      ᫮ 樠஢   ॢ ᫠ 童 
  ⮢,  樠. ਬ, ᫥
  樠 訡筠:

         char cv[4] = { 'a', 's', 'd', 'f', 0 };  // 訡

  R.8.4.2  ᨢ

  ᨢ ᨬ (,   ) 
  樠஢ ப-ࠫ: ᨬ ப ᫥⥫쭮
  樠  ᨢ. 饥 ।  ਬ
  ᨬ쭮 ᨢ,  ண 樠 ப:

         char msg[] = "Syntax error on line %s\n";

  ⨬,  ᪮ '\n'   ᨬ,  ᪮ 
  騩 ᨬ '\0', sizeof(msg) ࠢ 25.
         樠஢, 祬  ⮢  ᨢ,
  ⮬ ᫥騩 ਬ 訡祭:     ࠧ㬥饣
  ᨬ  ப ('\0'):

         char cv[4] = "asdf";  // 訡

  R.8.4.3 뫪

  ६, ᠭ  T&, .. "뫪  ⨯ T" ($$R.8.2.2),
   樠஢ ꥪ⮬ ⨯ T  ꥪ⮬, 
   ८ࠧ  ⨯ T, ਬ,

         void f()
         {
           int i;
           int& r = i;  // `r' 뫠  `i'
           r = 1;       // `i' ਭ 祭 1
           int* p = &r; // `p' 㪠뢠  `i'
           int& rr = r; // `rr' 뫠  ,   뫠 `r',
                        //  ..  `i'
         };

     뫪 ᫥ 樠樨   ⠪, ⮡ 
  砫 㣮 ꥪ. ⬥⨬,  樠 뫪
  ࠪ ᮢᥬ  ⠪,  ᢠ 뫪. ।
  ࠬ ($$R.5.2.2)    祭 㭪樨 ($$R.6.6.3)
   樠樥.
     樠  뫪  ᪠ ⮫쪮  ᠭ
  ࠬ ($$R.8.2.5),  ᠭ 頥 㭪樥 ⨯,
   ᠭ 童   ᠭ ᠬ  ($$R.9.2)  ⠬,
    ᯮ짮 ᯥ䨪 extern, ਬ,

         int& r1;        // 訡:  樠樨
         extern int& r2; // ଠ쭮

     ᫨ 樠  뫪  ⨯ T  ᮬ ⨯ T
   ⨯, ந  T ($$R.10),  ண T 㦨
  㯭  ⨯ ($$R.4.6), 뫪 㤥  祭,
   樠஬. ,  ⮬  ⮫쪮 ⮬ 砥, 
  뫪 砥 ꥪ  ᯥ䨪樥 const, 㤥 ᮧ ꥪ
  ⨯ T   ந樠஢ 祭,  樠஬.
   뫪 ࠥ ஫  ⮣ ꥪ, ਬ,

          double d = 1.0;

          double& rd = d;        // rd 뫠  `d'
          const double& rcd = d; // rcd 뫠  `d'

          double& rd2 = 1;       // 訡: ᮮ⢥⢨ ⨯
          const double& rcd2 = 1;// rcd2 뫠  ६ ꥪ
                                 //  祭 `1'

     뫪  volatile T  樠஢ ꥪ⮬ ⨯
  volatile T   T,   const T. 뫪  const T 
  樠஢ const T,  T  祬-,   ८ࠧ
   ⨯ T,   volatile T. 뫪  ⨯ T ( const  volatile)
   樠஢ ⮫쪮 ꥪ⮬ ⨯ T.
     ६  ६ ꥪ, ᮧ  ᠭ
  樠樨, । ⥪饩  ,  ன
    ᮧ ($$R.3.5). ⬥⨬,  뫪   B 
  樠஢ ꥪ⮬  D  ᫮,   
  筮 ।  㯭  ᮬ  D (⮣
  ,  "D  B"), . $$R.4.7.

  R.9 

    ⨯.   ᯮ  - ($$R.9.1), ..
  ⠭ १ࢨ஢ ᫮    .

         -:
             䨪

   ࠧ 樨 - ᯮ ᯥ䨪樨-
   ᯥ䨪樨-᫮-⨯ ($$R.7.1.6). ꥪ  ⮨ 
  ᫥⥫쭮 ( ⮩) 童.

      ᯥ䨪-:
        - { ᯨ᮪-童 opt }

      -:
        㦥-᫮- 䨪 opt ᯥ- opt
        㦥-᫮- - ᯥ- opt

      㦥-᫮-:
         class
         struct
         union

        ᯮ짮  ⢥ 樨 -
    ᯨ᪥-童 ᠬ ⮣ . 筮 ᯥ䨪-
  뢠 ᠭ .  ⠥ ।,  ⮫쪮
   ᯥ䨪-, ᬮ  ,   㭪樨-童
     ।.
     ꥪ ⮣   㫥 ࠧ.
     ꥪ ⨯   ᢠ, ।  ⢥
  ࠬ஢ 㭪権    ⢥ 祭, 頥
  㭪樥 ( ᪫祭 ꥪ⮢  ᮢ,   ஢
  ࠭祭, . $$R.12.8). 㣨  樨, ⠪, 
  ࠢ  ࠢ⢮,  । 짮⥫, . $$R.13.4.
      ன 뢠 , ᠭ  㦥-᫮-
  struct;  童    ($$R.10)  騬 
  । ($$R.11). ꥤ 뢠 , ᠭ 
  㦥-᫮- union;  童  騬 
  ।,     ६ ꥤ ᮤন ⮫쪮
   童 ($$R.9.5).

  R.9.1  

  ᠭ  ஦  ⨯. ਬ,  뢠
   ६  ࠧ ⨯:

        struct X { int a; };
        struct Y { int a; };
        X a1;
        Y a2;
        int a3;

   ᫥,  ⠪ ᢠ ਢ  ᮮ⢥⢨
  ⨯:

        a1 = a2;   // 訡: Y ᢠ X
        a1 = a3;   // 訡: int ᢠ X

   뢠 ॣ㧪 ($$R.13) 㭪樨 f(),   
  ୮ ᠭ ⮩  㭪樨:

        int f(X);
        int f(Y);

   ⮩  稭   । ,   
  ਬ ,   । S:

        struct S { int a; };
        struct S { int a; };  // 訡, ୮ ।

     ᠭ  砥      , 
  ன  ந諮,  뢠  , ꥪ, 㭪 
  㣮 ᠭ ⮣   ꥬ饩   ($$R.3.2).
  ᫨   ᠭ  ⠪  ,  㦥 
  ᠭ ꥪ  ⠪  , 㭪   ᫥, 
      ⮫쪮   樨
  ᯥ䨪-᫮-⨯ ($$R.7.1.6), ਬ:

        struct stat {
           // ...
        };

        stat gstt;              //  `stat' ᯮ 
                                // । ६
        int stat(struct stat*); // ८। `stat'  㭪樨

        void f()
        {
           struct stat* ps;     // 㦥 䨪 struct
                                //    stat
           // ...
           stat(ps);            // 맮 stat()
           // ...
        }

   ᯥ䨪-᫮-⨯  
  㦥-᫮-,   ᠭ ꥪ  㭪樨 ⠪
   㦨    ,   ᠭ , 
   ⮬ 砥   ⠥ ।, ਬ:

        struct s { int a; };

        void g()
        {
          struct s;  // 뢠   `s'
          s* p;      // ᯮ 쭠  `s'
          struct s { char* p; };  // ᠭ 쭮  `s'
        }

   ࠢ  ᠬ 뫠   㣠  
  ᠭ, ਬ,

        class vector;

        class matrix {
            // ...
            friend vector operator*(matrix&, vector&);
        };

       class vector {
           // ...
            friend vector operator*(matrix&, vector&);
       };

  ᠭ friend (㦥⢥ 㭪樨) 㦤  $$R.11.4, 
  㭪 operator  $$R.13.4. ᫨ , 㪠  , 
    ᠭ,   ⠥ ਭ騬 ⮩  
  ,  ன 室  , ᮤঠ饣 ᠭ
  friend ($$R.11.4).
       ᠭ ꥪ⮢  㭪権  ⠪ ᯮ짮
   ᯥ䨪-᫮-⨯ ($$R.7.1.6).  ᯮ짮
  ⫨砥  ᠭ  ⥬,  ᫨ ,   㪠
   ᯥ䨪樨, 室  ⥪饩  ,   
  ⮩ ᯥ䨪樨 㤥 뫠  , ਬ:

        struct s { int a; }

        void g()
        {
           struct* s p = new s;  // 饭  쭮 `s'
           p->a = 1;
        }

     ⠥ ᠭ ࠧ  ᫥   䨪
   ᠭ.  ᫥,   ᠭ

        class A * A;

  A  砫 ,   ,  ⥬  ८।
    㪠⥫  ꥪ ⮣ , ⮬  祭 ⮣
   ᫥ ᯮ짮 ᯥ䨪-᫮ ⨯ class A. 
  "⢮"    맢 㬥,    .
    -typedef ($$R.7.1.3) 砥   ⠥
  -, . ⠪ $$R.7.1.3.

  R.9.2  

     ᯨ᮪-童:
        ᠭ-童 ᯨ᮪-童 opt
        ᯥ䨪-㯠 : ᯨ᮪-童 opt

     ᠭ-童:
        ᯥ䨪樨-ᠭ opt ᯨ᮪-⥫-童 opt ;
        ।-㭪樨 ; opt
        筥- ;

     ᯨ᮪-⥫-童:
        ⥫-童
        ᯨ᮪-⥫-童 , ⥫-童

     ⥫-童:
        ⥫ ᯥ䨪-⮩ opt
        䨪 opt : ࠦ-⠭

     ᯥ䨪-⮩:
        = 0

      樨 ᯨ᮪-童   , 㭪樨,
  ,  ᫥ ($$R.7.2), ⮢ , 㧥
  ($$R.11.4)   ⨯ ($$R.7.1.3, $$R.9.1). ஬ ⮣,
  ᯨ᮪-童  ᮤঠ ᠭ, ⠭騥  
   童, . $$R.11.3.  童    
  ᠭ  ᯨ᪥-童. ᮪-童 ।  ⢮
  童  , ..     童  -
  㣮 ᠭ.
      ⬥⨬,      ᪮쪮 㭪権-童
   ᫮,   ⨯ 筮 ⫨   㣠 ($$R.13).
  ,  ⥫-童   ᮤঠ 樠 ($$R.8.4).
  樠 童    , . $$R.12.1.
          ᯥ䨪 auto, extern  register.
       ᯥ䨪樨-ᠭ  ⢮ ⮫쪮 
  ᠭ 㭪樨.  ᯨ᮪-⥫-童 
  ᪠ ⮫쪮 ᫥ 権 ᯥ䨪-,
  ᯥ䨪-᫥  ᯥ䨪-ᠭ, ᫨ ᫥
    friend ᯥ䨪-᫮-⨯. 
  ᯥ䨪-⮩ ᯮ ⮫쪮  ᠭ 㠫쭮
  㭪樨 ($$R.10.2).
      ᫨ 童  ꥪ⠬ ᮢ,    
   ࠭ ᠭ.  ⭮,  C1   ᮤঠ ꥪ
   C1,   ᮤঠ 㪠⥫  뫪   C1.
  ᫨  ⨯ ᪮ 童 ᯮ ᨢ,  
  ࠧ  ᮢ ᨢ   㪠.
      ਢ ⮩ ਬ ᠭ :

      struct tnode {
          char tword[20];
          int count;
          tnode *left;
          tnode *right;
      };

    ᮤন ᨢ   ᨬ, 楫  
  㪠⥫    . ᫥  ⠪ ᠭ
  ᫥饥:

      tnode s, *sp;

   s  ꥪ ⨯ tnode  sp  㪠⥫  tnode.  ⮬
   ᠭ s->count 砥 童 count ,  
  㪠뢠 sp; s.left 砥 㪠⥫ left  ॢ
   s; s.right->tword[0] 砥  ᨬ 童
  tword ॢ  s,   㪠뢠 right.
      ᪨ 童 , ।⠢騥   ᠭ
     ᯮ짮 ᯥ䨪樨-㯠, ࠧ 
  ꥪ ⨯  ⠪,   ᠭ 童  訥 .
  冷 ࠧ饭 ⠪ 童, ᫨  ᠭ ६
  ᠭﬨ  ᯥ䨪樥-㯠,   ॠ樨 ($$R.11.1).
  ਭ  ॠ樨 ࠢ ࠢ  ਢ  ⮬,
    ᥤ 童   ᯮ ࠧ   㣮.
   ⮬   ਢ ࠢ 뤥   㠫
  㭪権 ($$R.10.2)  㠫  ᮢ ($$R.10.1);
  . ⠪ $$R.5.4.
      㭪-童 ($$R.9.3),  ன ᮢ   ,
   ஬ ($$R.12.1).  ᪮ 童 ,
   ᫥, 童 ﭭ ꥤ  
  ⨯   ᮢ   .

  R.9.3 㭪樨-童

  㭪, ᠭ  童 ( ᯥ䨪樨 friend $$R.11.4),
  뢠 㭪-童  뢠  ᮮ⢥⢨  ᨭ⠪ᮬ
  童  ($$R.5.2.4), ਬ:

        struct tnode {
           char tword[20];
           int count;
           tnode *left;
           tnode *right;
           void set(char*, tnode* l, tnode *r);
        };

   set  㭪樥-童   뢠 ⠪:

        void f(tnode n1, tnode n2)
        {
           n1.set("abc",&n2,0);
           n2.set("def",0,0);
         }

     ⠥,  । 㭪樨-童 ਭ 
    .  砥,   㭪樨-童 (᫨ 
  ᪠, $$R.9.4)  ।⢥ ᯮ짮 
  童  .  ᪮ 㭪樨-童  ।⢥
  ᯮ짮  ⮫쪮 ᪨ 童, ⮢ ᫥
    ⨯. ᫨ । 㭪樨-童 室 
  ᠭ ,   ᫥ 筨    
  樨 ::, ਬ:

         void tnode::set(char* w, tnode* l, tnode* r)
         {
           count = strlen(w)+1;
           if (sizeof(tword)<=count)
              error("tnode string too long");
           strcpy(tword,w);
           left = 1;
           right = r;
         }

  祭 tnode::set 㪠뢠,  㭪 set  童 
  室     tnode.  童 tword,
  count, left  right ⭮  童 ⮣ ꥪ,  
  ண 뢠 ⮬  맮 n1.set("abc",&n2,0) tword
  砥 n1.tword,   맮 n2.set("def",0,0) tword 砥
  n2.tword. 㭪樨 strlen, error  strcpy   ᠭ -
   ணࠬ.
        । ($$R.3.1)  ᠭ ; ᫨ 
  ᠭ   뫨 ᠭ,   ।,   ᫥
  뢠 , . $$R.3.3. ᫥ । 
  㭪樨-童 ⮣   ᯮ짮  ᠭ 㧥.
  猪 뢠  ணࠬ 㭪-童    筮
   ।.
       맮 ᪮ 㭪樨-童 ($$R.9.4)  X,
    뢠   ꥪ⮬  X, ।.

  R.9.3.1 ⥫ this

   ᪮ ($$R.9.3) 㭪樨-童 㦥 ᫮ this 砥
  㪠⥫  ꥪ,    㭪 뢠.  㭪樨-童
   X ⨯ this  X *const, ᫨ ⮫쪮 㭪-童  ᠭ
   ᯥ䨪樥 const  volatile;   砥 this 
  ⨯ const X *const  volatile X *const ᮮ⢥⢥. ᫨
  㭪 ᠭ  㪠 const  volatile,  ⨯ this 㤥
  const volatile X *const, . ⠪ $$R.18.3.3. ਢ ਬ:

       struct s {
          int a;
          int f() const;
          int g() { return a++; }
          int h() const { return a++; }  // 訡
       };

       int s::f() const { return a; }

   a++  ⥫ 㭪樨 s::h 訡筠, ᪮   
   ⪠  ꥪ ( ),   뢠
  㭪 s::h().  ⨬  㭪樨-童, ᠭ 
  ᯥ䨪樥 const, .. this  㪠⥫  const, 묨
  ᫮, *this  ᯥ䨪 const.
     㭪-童 const (.. 㭪-童, ᠭ  ᯥ䨪樥
  const)  뢠   ꥪ⮢ const, ⠪   ꥪ⮢
   ᯥ䨪樨 const, ⮣  㭪-童  ᯥ䨪樨
  const  뢠 ⮫쪮  ꥪ⮢  ᯥ䨪樨 const,
  ਬ:

       void k(s& x, const s& y)
       {
         x.f();
         x.g();
         y.f();
         y.g();   // 訡
       }

   맮 y.g()  訡, .. y  const,  s::g() -
  㭪-童  ᯥ䨪樨 const,   
  ( ) ꥪ,    뢠.
     筮, ⮫쪮 㭪-童 volatile (.. 㭪-童,
  ᠭ  ᯥ䨪樥 volatile)  뢠  ꥪ⮢
   ᯥ䨪樥 volatile. 㭪-童   ६
  const  volatile.
      ꥪ⮢ const  volatile  뢠 
  ($$R.12.1)   ($$R.12.4).  ($$R.12.1) 
   ($$R.12.4)  뢠  ᯥ䨪ﬨ const
   volatile.

  R.9.3.2 㭪樨-童  ᯥ䨪樥 inline

  㭪-童  । ($$R.8.3)  ᠭ , 
  ⠪ 砥  ⠥ ⠭ (inline, $$R.7.1.2).
  । 㭪  ᠭ  -  ⭮ ⮬,
  ⮡ 뢠 㭪  ।   ᯥ䨪樥 inline
  ࠧ  ᫥ ᠭ . ⠥,  ⠪ ७
  । 㭪樨 ந室 ᫥ ९୮ ࠡ⪨
   ⠤ ᨭ⠪᪮   ஫ ⨯. ⮬
  ணࠬ ࠣ

        int b;
        struct x {
           char* f() { return b; }
           char* b;
        };

  ⥭

        int b;
        struct x {
           char* f();
           char* b;
        };

        inline char* x::f() { return b; } // ७

    㭪樨 x::f() ᯮ x::b,   쭮 b.
     㭪樨-童  ।   ᠭ  
   ᮢ,  ⠪ ७ 㤥 ᨭ⠪᪨ .
    㦤  R.9.8,     $$R.9.7.

  R.9.4 ᪨ 童

   童 , ।⠢饣   㭪,   ᠭ
    ᯥ䨪 static.  ᪮ 童,
  ।⠢饣 ,  ணࠬ  ⮫쪮  ,
     ꥪ ⮣ . ᪨ 童  
   ꥪ . ᪨ 童 쭮 
   譥 뢠 ($$R.3.3). ᠭ ᪮ 童,
  ।⠢饣 ,  ᠭ   ⠥ ।.
  ।     㣮 , . ⠪. $$R.18.3.
      ᪠ 㭪-童   㪠⥫ this, ⮬ 
  㯠  ᪨ 童 ᢮    ᯮ짮
  樨 .  ->. ᪠ 㭪-童    㠫쭮.
  ⨬ ᪨  ᪨ 㭪樨-童   
   묨 ⨯ ࠬ஢.
      ᪨ 童 쭮  ($$R.9.8)  
  뢠    ।  ᠭ . 
  ᫥,       ᪨ 童,
  ।⠢ .
       ᪮ 童 mem  c1    c1::mem
  ($$R.5.1), .. ᨬ    ꥪ.   ⠪ 
     権 㯠  童 .   ->. ᫨ 
  ᪮ 童 ந室 饭   権 㯠,
  ࠦ, 騥 ᫥  .  ->  . ᪨
  童 mem  , ᫨  ᮧ   ꥪ 
  c1.  ਬ  run_chain, idle  㣨 童  ,
  ᫨  뫮 ᮧ   ꥪ  process:

          class process {
            static int no_of_process;
            static process* run_chain;
            static process* running;
            static process* idle;
            // ...
          public:
            // ...
            int state();
            static void reshedule();
            // ...
          };

    㭪樨 reshedule    㪠 ꥪ
   process ⠪ ࠧ:

          void f()
          {
            process::reshedule();
          }

    ᪨ 童  ᮢ 樠 筮 ⠪ 
    ꥪ,     - 䠩, ਬ:

          void process::reshedule() { /* ... */ };
          int process::no_of_process = 1;
          process* process::running = get_main();
          process* process::run_chain = process::running;

  ᪨ 童 稭  ࠢ 㯠  童
   ($$R.11),  ᪫祭 ⮣,    樠஢
   䠩  .
       ⨯ ᪮ 童    , ⠪ ⨯
  process::no_of_process  int,  ⨯ &process::reshedule() -
  void(*)().


  R.9.5 ꥤ

  ꥤ  ।⠢  ,  童 
  㫥 ᬥ饭,  ࠧ  筮 , ⮡
      童.    ६ ꥤ
   ᮤঠ ⮫쪮  童.  ꥤ  
  㭪樨-童 ( ⮬ ᫥   ),  
  㠫 㭪樨 ($$R.10.2). ꥤ    
  ᮢ    ᠬ ᯮ짮  ⢥  .
   ꥤ    ꥪ   ஬ 
  ஬,  ⠪  । 짮⥫ 樥
  ᢠ ($$R.13.4.3). ꥤ   ᮤঠ ᪨
  童, ।⠢ .
      ꥤ 

          union { ᯨ᮪-童 }

  뢠 ﭭ ꥤ,  । ꥪ  
  (  ⨯).   童 ﭭ ꥤ 
  ⫨  㣨   ⮩  ,  ன ᠭ
  ꥤ;   ᯮ짮  ⮩  
  ।⢥,   権 㯠  童 ($$R.5.2.4).
  ਢ ਬ:

         void f()
         {
           union { int a; char* p; };
           a = 1;
           // ...
           p = "Jennifer";
           // ...
          }

   a  p ᯮ   ६ ( 童),  ᪮
   室   ꥤ,   ᮢ.
      ﭭ ꥤ    ᯥ䨪樥
  static. ﭭ ꥤ   ᮤঠ  
  饭 童 ($$R.11),  ⠪ 㭪権-童.
     ᫨ ᠭ ꥪ ꥤ  㪠⥫  , 
    ⠥ ﭭ, ਬ,

          union { int aa; char* p; } obj, *ptr=&obj;
          aa = 1;      // 訡
          ptr->aa = 1; // ଠ쭮

   ᢠ ⮬  aa , ..  童 
  ਢ易    ꥪ.
     樠 ꥤ,   ஢, 뢠
   $$R.8.4.1.

  R.9.6 ⮢ 

   ⥫-童,  ,
       䨪 opt : ࠦ-⠭
   ⮢ ,  ண ⤥   
  稥. 饭 ⮢   ꥪ   
  ॠ樨.  㯠뢠   㥬 
  .   設   室  ࠭ 
  ⮢,  㣨 - . ࠢ ⮢  ⮦ ।
  ॠ樥.   設 祭   ⮢ 
  ࠢ ,  㣨 - ᫥ ࠢ.
     ⮡ ⠭  ᯮ    
  ﬨ, ᯮ ﭭ ⮢ . ᮡ 砩, 
  ᯮ ﭭ  㫥 .   ࠢ
  ᫥饣 ⮢   ࠭  , ᯮ㥬
   ࠧ饭 .
     ﭭ    童    樠஢.
     ⮢    楫᫥ ⨯ ($$R.3.6.1). 
     ⮣, ⠥  祭    ⨯
  int (..   ᯮ짮 signed  unsigned) 
   .    &  ਬ  ⮢
  , ⠪      㪠⥫  ⮢ ,  뫮
   .

  R.9.7  ᠭ ᮢ

      ᠭ 㣮 .   뢠
  .    쭮  ⭮襭 
  ꥬ饬 .   室   
  ꥬ饣 . ᫨    ᯮ짮 㪠⥫,
  뫮   ꥪ⮢,   ᠭ   ⨬
  ⮫쪮  ⨯, ᪨ 童  ⮢ ᫥
   ꥬ饣 .

          int x;
          int y;

          class enclose {
          public:
           int x;
           static int s;

           class inner {

              void f(int i)
              {
                x = i;   // 訡: ᢠ enclose::x
                s = i;   // ଠ쭮: ᢠ enclose ::s
                ::x = i; // ଠ쭮: ᢠ 쭮 x
                y = i;   // ଠ쭮: ᢠ 쭮 y
              }

              void g(enclose* p, int i)
              {
                p->x = i; // ଠ쭮: ᢠ enclose ::x
              }

            };
          };
          inner* p = 0;   // 訡: `inner'   

  㭪樨-童     ᮡ ࠢ 㯠  童
  ꥬ饣 ,  稭  ࠢ 㯠 ($$R.11).
  筮, 㭪樨-童 ꥬ饣    ᮡ ࠢ
  㯠  童    稭  ࠢ
  㯠, ਬ:

           class E {
              int x;
              class I {
                 int y;
                 void f(E* p, int i)
                 {
                   p->x = i;  // 訡: E::x  童
                 }
               };

               int g(I* p)
               {
                 return p->y;  // 訡: I::y  童
               }
             };

  㭪樨-童  ।⠢騥 , ᪨ 童  
    ।  쭮  , ਬ:

             class enclose {
                class inner {
                   static int x;
                   void f(int i);
                };
              };

              typedef enclose::inner ei;
              int ei::x = 1;

              void enclose::inner::f(int i) { /* ... */ }

   㭪樨-童 㦥⢥ 㭪, ।  
  , 室    ⮣ .  稭
  ⥬  ࠢ 뢠 ,   㭪樨-童 ( 㪠 
    $$R.10.4),    ⠪    ᮡ ࠢ 㯠 
  童 ꥬ饣     ६ 㭪権 ⮣
   ($$R.11).

  R.9.8 ᠭ  ᮢ

      । 㭪樨, ⠪  뢠
  .  쭮  ⠥   ꥬ饩
   ,    쭮  
  ꥬ  .  ᠭ 쭮  
  ꥬ饩    ᯮ짮 ⮫쪮  ⨯,
  ᪨ ६, 譨 ६  㭪権,  ⠪
   ᫥. ਢ ਬ:

           int x;
           void f()
           {
             static int s;
             int x;
             extern int g();
             struct local {
                int h() { return x; }   // 訡: `x' ⮬᪠
                int j() { return s; }   // ଠ쭮
                int k() { return ::x; } // ଠ쭮
                int l() { return g(); } // ଠ쭮
             }
           }

     ꥬ 㭪   ᮡ ࠢ 㯠  童 쭮
  ,  稭  ࠢ 㯠 ($$R.11).
  㭪-童 쭮  ᫥ ।  । ⮣
  .      ᪨ 童,
  ।⠢ .

  R.9.9   ⨯

   ⨯ 稭 筮 ⠪  ࠢ ⥩ ,
    㣨 .  ⭮,  ⨯, ।  ᠭ
  ,  ᯮ짮  ⮣   筥, ਬ:

          class X {
          public:
            typedef int I;
            class Y { /* ... */ }
            I a;
          };

          I b;    // 訡
          Y c;    // 訡
          X::Y d; // 訡

  饥  ࠭稢 ᨬ  ⥪ ࠢ
  ᠭ 童 ,  ⠪  ࠢ ७ ⥫ 㭪権,
   ⠭. ᫥ ᯮ짮  ᠭ 
   ⠭, -  -typedef   ८। 
  ᠭ ⮣ . ,  饥 -  -typedef
     ।  ᠭ   -  -typedef,
  ᫨  㦥 ᯮ짮   ᠭ ⮣ .
  ᬮਬ ਬ:

          typedef int c;
          enum { i = 1 };
          class X {
            char v[i];
            int f() { return sizeof(c); }
            char c;          // 訡:  typedef
                             // ८। ᫥ ᯮ짮
            enum { i = 2 };  // 訡: `i' ८। ᫥
                             // ᯮ짮   ⨯ `char[i]'
          };

         typedef char* T;

         struct Y {
           T a;
           typedef long T;  // 訡:  T 㦥 ᯮ짮
           T b;
         };

  R.10 ந 

   ᠭ   㪠 ᯨ᮪  ᮢ  
  ᫥ 権:

         ᯥ-:
             : ᯨ᮪-

         ᯨ᮪-:
             ᯥ䨪-
             ᯨ᮪- , ᯥ䨪-

         ᯥ䨪-:
             --
             virtual ᯥ䨪-㯠 opt --
             ᯥ䨪-㯠 virtual opt --

         ᯥ䨪-㯠:
             private
             protected
             public

   -  ᯥ䨪樨-  
  ࠭ ᠭ  ($$R.9),  뢠  
  ⭮襭  ।塞 . ,   
  ந  ᢮  ᮢ. 祭 樨
  ᯥ䨪-㯠   $$R.11.  童  ,
  ᫨ ⮫쪮   ८।  ந ,  
  ⠪,     童 ந . ,
   ந  ᫥ 童  .  
  樨 ࠧ襭   :: ($$R.5.1)  童 
     .  饭    ⮬ 砥,
    童   ८।  ந .
  ந  ᠬ  㯠    ஫
  㯠, . $$R.11.2. ⥫  ந   
  ८ࠧ뢠  㪠⥫  筮 ।  㯭
    ($$R.4.6). 뫪  ந   
  ८ࠧ뢠  뫪  筮 ।  㯭
    ($$R.4.7).
     ᬮਬ ਬ:

          class base {
          public:
             int a, b;
          };

         class derived : public base {
         public:
            int b, c;
         };

         void f()
         {
           derived d;
           d.a = 1;
           d.base::b = 2;
           d.b = 3;
           d.c = 4;
          base* bp = &d;  // ⠭⭮ ८ࠧ derived*  base*
         }

   ᢠ 祭 ६ 童 d,  bp ࠨ
   d.
      뢠  , ᫨  室  ᯨ᪥-,
   ᢥ , ᫨ ᠬ    ,  㦨
      ᮢ ᯨ᪠-.
     ⬥⨬,   祭 - ::  ,  
    童 ᢥ  .  祭
   㪠뢠 ,  ஬ ᫥ 稭  ⮣ .
  ਢ ਬ:

         class A { public: void f(); }
         class B : public A { };
         class C : public B { public: void f(); }

         void C::f()
         {
           f();    // 맮 f()  C
           A::f(); // 맮 f()  A
           B::f(); // 맮 f()  A
         }

    뢠 A::f(), ᪮  ⢥ 㭪 f()
    B.
      樠 ꥪ⮢, ।⠢  , 
   , . $$R.12.6.2.

  R.10.1 ⢥  

     ந  ⭮襭    
  ᮢ. ਢ ਬ:

         class A { /* ... */ };
         class B { /* ... */ };
         class C { /* ... */ };
         class D : public A, public B, public C { /* ... */ };

  ᯮ짮 , 祬  אַ   뢠
  ⢥ ᫥.
     冷 ᫥  , ᫨  뢠 ᮢ,
  易  ⠭⭮ 樠樥   
  ($$R.12.1), 㭨⮦ ($$R.12.4)  ࠧ饭  
  ($$r.5.4, $$R.9.2, $$R.11.1). 冷 뤥   
  ᮢ । ॠ樥.
      㪠뢠   ⢥ אַ   ⭮襭
   ந    ࠧ,  ᢥ  ᮬ
     ⭮.

         class B { /* ... */ };
         class D : public B, public B { /* ... */ }; // ⨬

         class L { /* ... */ };
         class A : public L { /* ... */ };
         class B : public L { /* ... */ };
         class C : public A, public B { /* ... */ }; // ଠ쭮

   ꥪ  C 㤥    ꥪ  L.
      ᯥ䨪樨     㦥 ᫮
  virtual. ⤥ ꥪ 㠫쭮   V ࠧ
   ᥬ 묨 ᠬ,  㪠 V   ᢮
   ᮢ. ਢ ਬ:

         class V { /* ... */ };
         class A : virtual public V { /* ... */ };
         class B : virtual public V { /* ... */ };
         class C : public A, public B { /* ... */ };

   ꥪ  C 㤥  ⮫쪮   ꥪ
   V.
       ᮤঠ 㠫  㠫   
  ⨯, ਬ:

         class B { /* ... */ };
         class X : virtual public B { /* ... */ };
         class Y : virtual public B { /* ... */ };
         class Z : public B { /* ... */ };
         class AA : public X, public Y, public Z { /* ... */ };

   ꥪ  AA 㤥    ꥪ  B:
    Z   㠫, ࠧ塞  ᠬ X  Y.

  R.10.1.1 筮

         筮.  
  童   ⠥ , ᫨ ࠦ,
  ᯮ㥬  㯠,    㭪樨, ꥪ,
  ⨯   ᫥. ஢ઠ  筮 ந室
   ஢ન  㯠 ($$R.11). ਢ ਬ:

         class A {
         public:
           int a;
           int (*b)();
           int f();
           int f(int);
           int g();
         };

         class B {
            int a;
            int b();
         public:
            int f();
            int g();
            int h();
            int h(int);
         };

         class C : public A, public B { };

         void g(C* pc)
         {
           pc->a = 1;    // 訡: 筮: A::a  B::a
           pc->b();      // 訡: 筮: A::b  B::b
           pc->f();      // 訡: 筮: A::f  B::f
           pc->f(1);     // 訡: 筮: A::f  B::f
           pc->g();      // 訡: 筮: A::g  B::g
           pc->g = 1;    // 訡: 筮: A::g  B::g
           pc->h();      // ଠ쭮
           pc->h(1);     // ଠ쭮
         }

  ᫨  ॣ㦥 㭪樨 ⠭ 筮,  ०
  ஢ન  㯠 ந室   ࠧ襭 ॣ㧪.
  筮  ࠭,  ᯮ㥬  
  , ਬ, ⠪:

         class A {
         public:
           int f();
         };

         class B {
         public:
           int f();
         };

         class C : public A, public B {
           int f() { return A::f() + B::f(); }
         };

  ᫨ ᯮ 㠫  ,  ⤥쭮 㭪樨,
  ꥪ, ⨯   ᫥   ᪮쪨
  ﬨ,   ࠢ 横筮 , 
  ࠧ  .     筮.
  筮  ᯮ짮 㠫  ᮢ
  ஦ 筮, ᪮  ⮬ 砥  
   㯠    ꥪ. ਢ ਬ:

         class V { public: int v; };
         class A { public: int a; };
         class B : public A, public virtual V { };
         class C : public A, public virtual V { };

         class D : public B, public C { public: void f(); };

         void D::f()
         {
           v++;   // ଠ쭮
           a++;   // 訡, 筮:  `a'  `D' 室 
         }

  ᫨ ᯮ 㠫  ,  
    ࠢ 横筮 ,   ,
  祬    㭪樨, ꥪ   ᫥. ,
  筮, 筮,  ஬ ,    
   㣨. 筮 ᯮ짮 㠫  ᮢ
  ᥣ ਢ  筮, ..  ⮬ 砥 ᥣ 
     ꥪ.
       ⠥,   B::f    A::f, ᫨ 
  A    B . ᫨    
  㣨,    ਢ  筮:  樨 롮
  ᯮ ᥣ 饥 . ਢ ਬ:

         class V { public: int f(); int x; };
         class B : public virtual V { public: int f(); int x; };
         class C : public virtual V { };

         class D : public B, public C { void g(); };

         void D::g()
         {
           x++;   // ଠ쭮: B::x   V::x
           f();   // ଠ쭮: B::f()   V::f()
         }

   १    ८ࠧ 㪠⥫  뫪
   ந   㪠⥫  뫪     
  ᮢ,  㪠⥫  뫪  㪠뢠 ⮫쪮  
   ᠬ ꥪ,  ।⠢  . ਢ ਬ:

         class V { };
         class A { };
         class B : public A, public virtual V { };
         class C : public A, public virtual V { };
         class D : public B, public C { };

         void g()
         {
           D d;
           B* pb = &d;
           A* pa = &d;  // 訡, 筮: A  C  A  B?
           v* pv = &d;  // ଠ쭮: ⮫쪮   ꥪ V
         }


  R.10.2 㠫 㭪樨

  ᫨  base ᮤন 㠫 ($$R.7.1.2) 㭪 vf, 
  ந    derived ⠪ ᮤন 㭪 vf ⮣
   ⨯, ⮣ 맮 vf  ꥪ  derived 
  饭  derived::vf,  ᫨   ⮩ 㭪樨 ந室
  १ 㪠⥫  뫪   base. ,  㭪
  ந   㭪  . , ᫨
  ⨯ 㭪権 ($$R.8.2.5) ࠧ, 㭪樨  ࠧ묨  堭
  㠫쭮   (. ⠪ $$R.13.1). ⠥ 訡,
  ᫨ 㭪 ந  ⫨砥  㠫쭮 㭪樨
    ⮫쪮 ⨯ 頥 祭. ᬮਬ
  ਬ:

          struct base {
            virtual void vf1();
            virtual void vf2();
            virtual void vf3();
            void f();
          };

          class derived : public base {
          public:
            void vf1();
            void vf2(int);     // 뢠 base::vf2()
            char vf3();        // 訡: ࠧ稥 ⮫쪮  ⨯
                               // 頥 祭
          }

          void g()
          {
            derived d;
            base* bp = &d;     // ⠭⭮ ८ࠧ: derived*  base*
            bp->vf1();         // 맮 derived::vf1
            bp->vf2();         // 맮 base::vf2
            bp->f();           // 맮 base::f
          }

    맮  ꥪ d  derived ਢ  饭 
  derived::vf1, base::vf2  base::f ᮮ⢥⢥. 묨 ᫮,
   맮 㠫쭮 㭪樨   ⨯ ꥪ,
   ண  뢠, ⮣   맮
  㠫쭮 㭪樨-童  ⮫쪮  ⨯ 㪠⥫ 
  뫪   ꥪ. ਬ, ࠦ bp->vf1()
  ਢ  맮 derived::vf1(), ᪮ bp 㪠뢠  ꥪ
   derived,  ஬ 㭪 derived::vf1() 
  㠫 㭪 base::vf1().
     稥 ᯥ䨪樨 virtual 砥,  㭪  童,
  ⮬ 㠫쭠 㭪    쭮 㭪樥 ( 童)
  ($$R.7.1.2). 筮 ⠪  㠫쭠 㭪   
  ᪨ 童, ..  맮 㠫쭮 㭪樨 室
  稥 । ꥪ,  㪠뢠,  㭪
   뢠.  㣮  㠫 㭪   
  㣠. 㭪,  㠫, ᠬ ⠥ 㠫쭮
  㭪樥. 䨪 virtual  ᯮ짮  饩
  㭪樨 ந ,   筮. 㠫쭠 㭪
    ।  ᠭ     
  ($$R.10.3). 㠫 㭪,  ।   ,
   㦭 ।  ந :   맮 㤥
  ᯮ짮 㭪, ।   .
      堭 㠫쭮  맮 ⪫砥, ᫨  
  筥     ࠧ襭  
 ($$R.5.1), ਬ:

         class B { public: virtual void f(); };
         class D : public B { public: void f(); };

         void D::f() { /* ... */ B::f(); }

   饭  f  D ਢ  맮 B::f,   D::f.

  R.10.3 ࠪ 

  ࠪ   ।⢮  ।⠢  몥 
  ⨩, ⠪, ਬ,  䨣,    ᯮ짮
  ⮫쪮   ਠ, ਬ,   . ஬ ⮣
  ࠪ    䥩, ࠧࠧ ॠ樨
  ண ।⠢ ந .
     ࠪ 뢠 ,   ᯮ짮 ⮫쪮
     ண 㣮 , ..  ᮧ
   ꥪ ࠪ⭮  ஬ ⮣,  ।⠢
     ண ந .  ⠥
  ࠪ, ᫨        㠫쭠
  㭪.  ᠭ  㠫쭠 㭪 뢠 
     ᯥ䨪樨-⮩ ($$R.9.2).  㠫
  㭪  㦭 ।, ᫨ ⮫쪮    뢠
    樨 筥- ($$R.5.1). ᬮਬ ਬ:

           class point { /* ... */ };
           class shape {     // ࠪ 
             point center;
             // ...
           public:
             point where() { return center; }
             void move(point p) { center=p; draw(); }
             virtual void rotate(int) = 0; //  㠫쭠
             virtual void draw() = 0;      //  㠫쭠
             // ...
           };

  ࠪ   ᯮ짮  ⨯ ଠ쭮 ࠬ,
  ⨯ 頥 祭,  ⠪  ⨯  樨 
  ८ࠧ ⨯.  뢠 㪠⥫  뫪  ࠪ
  , ਬ:

           shape    x;       // 訡: ꥪ ࠪ⭮ 
           shape*   p;       // ଠ쭮
           shape    f();     // 訡
           void g(shape);    // 訡
           shape& h(shape&); // ଠ쭮

     㠫 㭪樨  ᫥   㠫
  㭪樨, ਬ:

           class ab_circle : public shape {
             int radius;
           public:
             void rotate(int) { }
             // ab_circle::draw()  㠫쭠 㭪
           };

  ᪮ 㭪 shape::draw()  ⮩ 㠫쭮 㭪樥,
   ⠪  㤥  ।  㭪 ab_circle::draw(). 
  ਢ  ᠭ  circle  㤥 ࠪ,  
  㭪樨 circle::draw() -  ⢮ ।.

           class circle : public shape {
              int radius:
           public:
              void rotate(int) { }
              void draw();  //   - ।
           };

     㭪樨-童  뢠   ࠪ⭮ ,
  १ אַ  ᢥ 맮 ⮩ 㠫쭮 㭪樨
   ꥪ, ᮧ   ⠪ , ।.

  R.10.4  ࠢ  

    ᢥ  ࠢ ⥩   ணࠬ
   ++.  ࠢ  ਬ    (
  -typedef ($$R.7.1.3)  - ($$R.9.1))   
  ⥪,  ண  ⨬  ᨭ⠪ 몠. 
  ᬠਢ ⮫쪮    ᪮ ஢,
   뢠 㦤  $$R.3.3. ⨥  ᠭ
  뫮   $$R.3.2.
      类 ᯮ짮     ( 
  ॣ㧪)     ($$R.10.1.1). ࠢ 㯠
  ($$R.11) 稭 ⢮ ⮫쪮 ⮣,    筮
      . 쪮  ᫮,  ࠢ 㯠
     襭, 稭 ஢ઠ ⨯ ꥪ, 㭪樨 
   ᫥.
     , ஥ ᯮ   㭪樨  ,  ।
   ⮨ 㭠ୠ  ࠧ襭   ::
  ( ஥   ୮ 樥 ::  ﬨ ->
   .),    쭮 ꥪ,  㭪樨, 
   ᫥,  ⨯.
     ,  ᫥ X::  obj.,  obj ⨯ X  ⨯
  뫪  X,  ⠪ ,  ᫥ ptr->,  ptr ⨯ 㪠⥫
   X,    童  X  童  
  ⭮襭  X .  ⮣,  饭 ptr->  ptr 
   ꥪ⮬  Y,  ஬  㭪 operator->(),
  ᠭ ⠪ ࠧ,  ptr->operator()  筮 
  뢠 㪠⥫  X ($$R.13.4.6).
    , ஥     ᠭ  ᯮᮡ, ,
  ஥ ᯮ  㭪樨,  饩 童 ,
    ᠭ  ⮬ ,   ᯮ,  
  ꥬ饬     . ᠭ 쭮 
  뢠 ᠭ ⮣    ꥬ ,  ⠪ 
  ᠭ  쭮 .  ⭮, ॣ㧪 
      ࠧ   ($$R.13.4).
    , ஥     ᠭ  ᯮᮡ, ,
  ஥ ᯮ  㭪樨, 饩 ᪨ 童
   X,   ᠭ   ⮬ ,   ᯮ,
    ꥬ饬 ,     童  X, 
  童   ⭮襭  X ,     
  . ᠭ   뢠 ᠭ   
   ꥬ ,  童  ⮩ 㭪樨  । 
  . ᠭ 童 뢠  ᠭ  ⥬  
      ।  .
     , ஥     ᠭ  ᯮᮡ, ,
  ஥ ᯮ  ᪮ 㭪樨-童  X, 
   ᠭ   ⮬ ,   ᯮ,   ꥬ饬
  ,    ᪨ 童  X,   
  ⭮襭  X ,      .
      ଠ쭮 ࠬ 㭪樨,    ।
  ($$R.8.3), ਭ  , ᮢ饩  訬
   㭪樨 ( ⭮,   ). 
  ଠ쭮 ࠬ 㭪樨,    ᠭ ($$R.8.2.5),
    ।, ਭ 쭮  , 
  祧 ࠧ  ᫥ ᠭ 㭪樨. ⠭ 祭
  ࠬ஢ 室   , ।塞  
  ᠭ ($$R.3.2) ଠ ࠬ஢ 㭪樨;    
  ᯮ짮  ६  ᪨ 童 ,
       맮 㭪樨 ($$R.8.2.6).
     樠-ctor ($$R.12.6.2)    
  襣  ,  ண  .  ⭮,
     ᯮ짮  ଠ ࠬ஢.

  R.11 ஫ 㯠  童

     :
       (private);  ,     ᯮ짮
      ⮫쪮  㭪-童   ,  ஬  ᠭ;

      饭 (protected);  ,     ᯮ짮
      ⮫쪮  㭪-童   ,  ஬  ᠭ,
       ⠪  㭪-童   ᮢ, 
      ந묨  ⭮襭  ⮬  (. $$R.11.5);

      騬 (public);  ,     ᯮ짮
        㭪樨.
      , ᠭ  㦥 ᫮ class, 
  묨  ।.  , ᠭ  㦥
  ᫮ struct  union,  騬  ।, ਬ:

        class X {
           int ;    // X::   ।
        };

        struct S {
           int a;   // S::a 騩  ।
        };

  R.11.1 䨪樨 㯠

  ᠭ 童   ᭠ ᯥ䨪樥 㯠 ($$R.10):
        ᯥ䨪-㯠 : ᯨ᮪-童 opt
  䨪-㯠  ࠢ 㯠  童, 
           㣠
  ᯥ䨪-㯠, ਬ,

        class X {
          int a;  // X::a   ।: 뢠 'class'
        public:
          int b;  // X::b 騩
          int c;  // X::c 騩
        };

  ⨬  ᫮ ᯥ䨪権 㯠     
   浪, ਬ,

       struct S {
          int a;  // S::a 騩  ।: 뢠 `struct'
       protected:
          int b;  // S::b 饭
       private:
          int c;  // S::c 
       public:
          int d;  // S:: d 騩
       };

    冷 ࠧ饭 童, ।⠢ ,  
  ࠧ ᯥ䨪樨-㯠, । ॠ樥 ($$R.9.2).

  R.11.2 䨪樨 㯠   ᮢ

  ᫨  ᠭ   ($$r.10)  ⭮襭 
  㣮    ᯥ䨪樨 㯠 public,  童 
  ᯥ䨪樥 public  protected    
  ᮮ⢥⢥ 童  ⮩  ᯥ䨪樥  ந .
  ᫨  ᠭ    ⭮襭  㣮  
  ᯥ䨪樨 㯠 private,  童  ᯥ䨪樥 public 
  protected     童  ᯥ䨪樥
  private  ந .  童  
   㯭묨   ந ᮢ, ᫨ ⮫쪮 
  ᯥ祭 㯠  ᠭ    뫮 ᯮ짮
  ᠭ friend.
      ᫨     㪠 ᯥ䨪-㯠, 
   ந , ᫨  ᠭ  struct, ।
  ᯥ䨪 public,  ᫨  ᠭ  㦥 ᫮
  class,  - ᯥ䨪 private, ਬ:

         class B { /* ... */ };
         class D1 : private B { /* ... */ };
         class D2 : public B { /* ... */ };
         class D3 : B { /* ... */ }; // `B'   ।
         struct D4 : public B { /* ... */ };
         struct D5 : private B { /* ... */ };
         struct D6 : B { /* ... */ }; // `B'   ।

     騬 (public)  ᮬ  D2, D4  D6
    (private)  ᮬ  D1, D2  D5.
      ᠭ    private     
  ᪨ 童  . , ᫨  饭 
  ᪮ 童 ᯮ ꥪ  㪠⥫, 
  㦭 ८ࠧ뢠,    ࠢ ८ࠧ
  㪠⥫.
       㭪-童    X  X* 
  ८ࠧ뢠  㪠⥫   , 騩
  ।⢥   ⭮襭  X.


  R.11.3 ᠭ 㯠

  ᯮ 筥 ,  ⠭   童 
     public  protected ᠭ ந .
   뢠 ᠭ 㯠.
     ਢ ਬ:

         class B {
           int a;
         public:
           int b, c;
           int bf();
         };

         class D : private B {
           int d;
         public:
           B::c;   // adjust access to `B::c'
           int e;
           int df();
         };

         int ef(D&);

   譥 㭪樨 ef  ᯮ짮 ⮫쪮  c, e,  df.
  ᪮ 㭪 df 童  D,    ᯮ짮
   b, c, bf, d, e  df,   a. 㭪 bf - 童  B 
     ᯮ짮 童 a, b, c  bf.
     ᠭ 㯠  ᫥ ᯮ짮  ࠭祭 㯠
   童, 㯭   , ⠪   ᫥
  ᯮ짮   ᯥ祭 㯠  童,  㯥
    , ਬ:

         class B {
         public:
           int a;
         private:
           int b;
         protected:
           int c;
         };

         class D : private B {
         public:
           B::a;    //  `a'  騩 童 D
           B::b;    // 訡: ⪠  ,
                    // `b'    騬 童 D
         protected:
           B::c;    //  `c'  饭 童 D
           B::a;    // 訡: ⪠ 㧨 ,
                    // `a'    饭 童 D
         };

  ᠭ 㯠   ॣ㦥 㭪樨 ⠭
       ᥬ 㭪  ⨬ , ਬ:

         class X {
         public:
           f();
           f(int);
         };

         class Y : private X {
         public:
           X::f;   // makes X::f() and X::f(int) public in Y
         };

       ந  ⠭   童 
  , ᫨  ந  । 童  ⨬  ,
  ਬ:

         class X {
         public:
           void f();
         };

         class Y : private X {
         public:
           void f(int);
           X::f;   // 訡:  ᠭ f
         };

  R.11.4 

  㣮  뢠 㭪,    童 ,
    ன  ᯮ짮   饭 童 ⮣
  .  㣠  ਭ   , 
  㦥⢥ 㭪  뢠   権 㯠 
  童 ($$R.5.2.4), ᫨ ⮫쪮    童 㣮
  . 騩 ਬ 뢠 ࠧ稥  童 
  ﬨ:

         class X {
           int a;
           friend void friend_set(X*, int);
         public:
           void member_set(int);
         };

         void friend_set(X* p, int i) { p->a = i; }
         void X::member_set(int i) { a = i; }

         void f()
         {
           X obj;
           friend_set(&obj,10);
           obj.member_set(10);
         }

     ᫨  ᠭ friend ᯮ짮  ॣ㦥 㭪樨
   樨, ⮫쪮 㭪, 筮 ।塞 ⨯
  ଠ ࠬ஢, ⠭ 㣮. 㭪-童  X
    㣮  Y, ਬ:

         class Y {
           friend char* X::foo(int);
           // ...
         };

     㭪樨  X ﬨ  Y  
  ᯥ䨪樨-᫮-⨯ ($$R.9.1):

         class Y {
           friend class X;
           // ...
         };

  ᠭ     㣮  ⥫쭮
  ࠧ㬥,    饭 童 , ।饣
  㦡,  ᯮ짮  , 饬 , ਬ:

         class X {
           enum { a=100 };
           friend class Y;
         };

         class Y {
           int v[X::a];   // Y   X
         };

         class Z {
           int v[X::a];   // 訡: X::a 㯭
         };

    ᫨   㭪,   ,  뫨 ᠭ,
         ,    ,
  ᮤঠ饣 ᠭ friend ($$R.9.1).
    㭪,   ࠧ  ᠭ friend, ⠥
  ⭮ 㭪樨, ᠭ  extern ($$R.3.3, $$r.7.1.1).
    ᫨ 㭪- ।  ᠭ ,  ⠥
  㭪樥  ᯥ䨪樥 inline    ਬ ࠢ
  ७ । 㭪樨  㭪権-童 ($$R.9.3.2).
  㭪-, ।  ᠭ , ⭮ 
  ᪮ ஢    ⮣ . 
  㭪樨-㣠, ।  ,   ⠪.
     ᠭ friend   㪠 ᯥ䨪権-㯠
  ($$R.9.2).
  ⨥ 㦡    ᫥㥬,  ࠭⨢.
  ⢥न  ਬ஬:

       class A {
         friend class B;
         int a;
       };

       class B {
         friend class C;
       };

       class C {
         void f(A* p);
         {
           p->a++;   // 訡: C    A, 
                     //  㣮 㣠  A
         }
       };

       class D : public B {
         void f(A* p)
         {
           p->a++;   // 訡: D    A, 
                     //  ந 㣠  A
         }
       };

  R.11.5   饭 童

    㭪-童 ந     饭
  ᪮ 童  .   㭪-童 ந
       饭 ᪮ 童
    ᢮  ᮢ ⮫쪮 १ 㪠⥫, 뫪 
  ꥪ ந  (  , 饣
  ந  ⭮襭  ). ᬮਬ ਬ:

       class B {
       protected:
         int i;
       };

      class D1 : public B {
      };

      class D2 : public B {
        friend void fr(B*, D1*, D2*);
        void mem(B*, D1*);
      };

     void fr(B* pb, D1* p1, D2* p2)
     {
       pb->i = 1;  // ⨬
       p1->i = 2;  // ⨬
       p2->i = 3;  // ଠ쭮 (饭 १ D2)
     }

     void D2::mem(B* pb, D1* p1)
     {
       pb->i = 1;  // ⨬
       p1->i = 2;  // ⨬
       i = 3;      // ଠ쭮 (饭 १ this)
     }

     void g(B* pb, D1* p1, D2* p2)
     {
       pb->i = 1;  // ⨬
       p1->i = 2;  // ⨬
       p2->i = 3;  // ⨬
     }

  R.11.6   㠫 㭪

  ࠢ 㯠 ($$r.11)  㠫쭮 㭪樨 । 
  ᠭ      ࠢ 㯠   㭪樨, 
   㤥  . ਢ ਬ:

      class B {
      public:
        virtual f();
      };

      class D : public B {
      private:
        f();
      };

      void f()
      {
        D d;
        B* pb = &d;
        D* pd = &d;

        pb->f();   // ଠ쭮: B::f() 騩 童
                   // 뢠 D::f()
        pd->f();   // 訡: D::f()  童
      }

  ࠢ 㯠 ஢  ᠬ 맮, ᯮ ⨯ ࠦ,
  饥 ꥪ,  ண 뢠 㭪-童 ( ਬ
    B*).   㭪樨-童  ,   ।
  (D  ਬ ),  饬 砥 ⥭.

  R.11.7 ⢥ 

  ᫨     ᪮쪨 ﬨ  , 饬
  ⢥ ᫥,  ࠢ 㯠 ⮣  ⠥
  ᨬ  ࠢ, 砥  ࠧ . ᭨ 
  ਬ஬:

       class W { public: void f(); };
       class A : private virtual W { };
       class B : public virtual W { };
       class C : public A, public B {
          void f() { W::f(); } // ଠ쭮
       };

  ᪮ W::f() 㯭  C::f()  , 易  騬
  ᫥  B, 饭  .

  R.12 樠 㭪樨-童

   㭪樨-童  ᯥ樠묨, ᪮ 
    ,  ꥪ  ᮧ,   㭨⮦,
    祭  ⨯ ८ࠧ  祭 㣮 ⨯.
   ⠪ 㭪樨 뢠 .
       㭪樨-童 稭  ࠢ 㯠 ($$R.11).
  ਬ, ᠭ   ᯥ䨪樥 protected
  ࠭,  ᮧ ꥪ    ᬮ ⮫쪮
  ந   .

  R.12.1 

  ஬ 뢠 㭪-童,  ன ᮢ  
  ,  ᯮ  ஥ 祭,  ⨯ 
  . ᫨    ,   ꥪ ⮣ 
  । ந ᯮ짮 㤥 樠஢, .
  $$R.12.6.
       뢠  ꥪ  ᯥ䨪樥 const
   volatile.    뢠  ᯥ䨪樥
  const  volatile ($$R.9.3.1).  ⠪   
  ᯥ䨪 virtual  static.
       ᫥, , ⠭ 
    ஢  室 ᮧ ࠭஬
  ($$R.12.8).    騬.
     ⠭ ஬   X  ⠪ 
   X,   뢠  ࠬ஢. ⠭
     X 㤥 ᮧ ⮫쪮 ⮣,   
  X  ᠭ   .
     ஬ ஢   X 뢠 ,
   뢠  ஢ ꥪ  X, .. 뢠
    ࠬ஬ ⨯ X. ਬ, X::X(const X&) 
  X::X(X&, int=0)  ࠬ ஢. 
  ஢ ᮧ ⮫쪮 ⮣,   ᠭ  
   ஢.
      ஢   X     ⢥
  ࠬ ꥪ ⨯ X, ਬ X::X(X)  饭.
       ᨢ ⮢ 뢠  浪
  ⠭ ᮢ ⮢ ($$R.8.2.4).
     ᫨       ஬  童,
  騥 ꥪ⠬  ஬,   뢠
  ०, 祬  ந .  $$R.12.6.2 
    ࠬ  ⠪ ஢   ।
  冷  맮.
     ꥪ   ஬    童 ꥤ.
        㦭 㪠뢠  ⨯ 頥
  祭,  void.   return  ⥫  
  㪠뢠 頥 祭.  ⨬  
   .
        ᯮ짮  ᮧ ꥪ⮢ 
  ⨯   ᫥饩 :
          - ( ᯨ᮪-ࠦ opt )
  ਢ ਬ:

          complex zz = complex(1,2.3);
          print( complex(7.8,1.2) );

  ꥪ, ᮧ ⠪ ࠧ  ﭭ (᫨ ⮫쪮
    ᯮ짮  樠樨  ६
   zz ),  ६   ࠭祭 ࠦ,  ஬
    ᮧ, . $$R.12.2.
         뢠 㭪-童, . $$R.12.7.

  R.12.2 ६ ꥪ

     ࠭ 뢠 室  㤮
  ᮧ ६ ꥪ. ᯮ짮 ६ ꥪ⮢
    ॠ樨. ᫨ ࠭  ६
  ꥪ ⨯   ஬,   ᯥ 맮
    ⮣ ६ ꥪ. 筮, 室
  뢠   ꥪ ,  ஬ ᠭ
  . ਢ ਬ:

          class X {
            // ...
          public:
            // ...
            X(int);
            X(X&);
            ~X();
          };

          X f(X);

          void g()
          {
            X a(1);
            X b = f(X(2));
            a = f(b);
          }

   㦥 ६ ꥪ  ஥ X(2), ० 祬
  ।  㭪樨 f()   X(X&). ୠ⨢ 襭, -
  ந ꥪ X(2)  , ᯮ㥬  ࠭ ࠬ
   ࢮ 맮 f().  ⮣, ६ ꥪ 
    ࠭ १ f(X(2)) ०, 祬 ஢
    ꥪ b   X(X&),    ୠ⨢
  襭: ࠭ १ f(X(2))    ꥪ b.   㣮
  ஭,   㭪権 f(),   믮
  ࠦ a=f(a) ॡ ६ ꥪ   ࠬ a,
    १ f(a), ⮡  ⥫쭮 ᯮ짮
  , ன ਯ뢠  a.
      ࠭ 易 ࠭஢ 㭨⮦ ६ ꥪ⮢.
    㭨⮦ । ॠ樥.  ६묨
  ꥪ⠬  ந ⮫쪮  樨:  祭
  ꥪ (  )  ᯮ짮  㣮 ࠦ,
    뫪  . ᫨ 祭 ६ ꥪ 祭,
   ⠥ 㦭   㭨⮦ . ᫨  
  祭 뫪,  㭨⮦  ,   뫪.
  ⮦  ந  室   ।,
   ன  ᮧ ६ ꥪ.
      㣮  ६ ꥪ⮢ 㦤  $$R.8.4.3.

  R.12.3 ८ࠧ

  ८ࠧ ꥪ⮢      ஢
   㭪権 ८ࠧ.
      ८ࠧ, 筮 뢠 짮⥫᪨,
  ᯮ   ᮢ㯭  ⠭묨 ८ࠧﬨ
  ($$R.4). ਬ, 㭪  ଠ ࠬ஬ ⨯ X 
  뢠  ⮫쪮  ࠬ஬ ⨯ X,   ࠬ஬ ⨯ T,
  ᫨  ८ࠧ ⨯ T  X. 짮⥫᪨
  ८ࠧ ਬ    ,   ⠭:
  ८ࠧ 樠஢ ($$R.8.4), ࠬ஢ 㭪樨
  ($$R.5.2.2), 頥 㭪樥 祭 ($$R.6.6.3, $$R.8.2.5),
  ࠦ 䠪᪨ ࠬ஢ ($$R.5), ࠦ, ࠢ
  横  롮஬ ஢ ($$R.6.4,$$R.6.5)   樨
  ८ࠧ ⨯ ($$R.5.2.3, $$R.5.4).
     짮⥫᪨ ८ࠧ ਬ ⮫쪮  砥
   筮 ($$R.10.1.1, $$R.12.3.2). ८ࠧ 室
  ஢  ᮮ⢥⢨ ࠢ 㯠 ($$R.11).  ᥣ
  ஢ઠ 㯠 ⢫ ᫥ ࠧ襭 筮
  ($$R.10.4).
      ਬ ८ࠧ  맮 㭪樨 ᬠਢ 
  ਬ, ਢ ,  ⠪ 㦤  $$R.13.2.

  R.12.3.1 ८ࠧ   

  , 騩 ⢥ ࠬ,  ८ࠧ
  ⨯ ᢮ 䠪᪮ ࠬ  ⨯  , ਬ:

           class X {
             // ...
           public:
             X(int);
             X(const char*, int = 0);
           };

           void f(X arg) {
              X a = 1;        // a = X(1);
              X b = "Jessie"; // b = X("Jessie",0)
              a = 2;          // a = X(2)
              f(3);           // f(X(3))
           }

  ᫨   X  ,  ᪠  ⨯,
    ⪨  -  㣮  
  㭪 ८ࠧ  ਢ  祭  祭
  ⨯,⨬    X, ਬ:

           class X { /* ... */ X(int); };
           class Y { /* ... */ Y(X); };
           Y a = 1;        // ⨬: ८ࠧ Y(X(1))
                           //  ਬ

  R.12.3.2 㭪樨 ८ࠧ

  㭪-童  X,  ன  ,

           -㭪樨-८ࠧ:
               operator -⨯-८ࠧ

           -⨯-८ࠧ:
               ᯨ᮪-ᯥ䨪権-⨯ opt -ptr opt

   ८ࠧ  ⨯ X  ⨯, ।塞 樥
  -⨯-८ࠧ.  㭪樨-童 뢠 㭪ﬨ
  ८ࠧ.  樨 ᯨ᮪-ᯥ䨪権-⨯ 
  뢠 , ᫥  -typedef,  ⠪ 
   ⨯ ଠ ࠬ஢  ⨯ 頥 祭.
     ਢ ਬ:

            class X {
              // ...
            public:
              operator int();
            };

            void f(X a)
            {
              int i = int(a);
              i = (int)a;
              i = a;
             }

       ᢠ 祭 㤥
  ८ࠧ뢠   㭪樨 X::operator int(). 짮⥫᪨
  ८ࠧ  ࠭稢 ⮫쪮 ᯮ짮  ᢠ
   樠樨, ਬ:

             void g(X a, X b)
             {
               int i = (a) ? 1+a : 0;
               int j = (a&&b) ? a+b : i;
               if (a) { // ...
               }
             }

     樨 ८ࠧ ᫥. 㭪樨 ८ࠧ
    㠫묨.
       祭  ਬ   
  짮⥫᪮ ८ࠧ (    㭪樨
  ८ࠧ), ਬ:

       class X {
         // ...
       public:
         operator int();
       };

       class Y {
         // ...
       public:
         operator X();
       };

       Y a;
       int b = a;     // ⨬: ८ࠧ
                      // a.operator X().operator int()  ਬ
       int c = X(a);  // ଠ쭮: a.operator X().operator int()

     짮⥫᪨ ८ࠧ ⢫  ⮫쪮
   ᫮  筮. 㭪 ८ࠧ ந
    뢠 㭪 ८ࠧ  , ᫨
  ⮫쪮   ८ࠧ    ⮬  ⨯, ਬ:

             class X {
             public:
               // ...
               operator int();
             };

             class Y : public X {
             public:
               // ...
               operator void*();
             };

             void f(Y& a)
             {
               if (a) {  // 訡: 筮
               }
             }

  R.12.4 

  ஬ 뢠 㭪-童  cl   ~cl, 
  ᯮ  㭨⮦ 祭 ⨯ cl ।⢥ ।
  㭨⮦ ꥪ, ᮤঠ饣 .    ଠ
  ࠬ஢      ⨯ 頥 祭
  ( void).  ਬ     .
   뢠   ꥪ⮢  ᯥ䨪樥 const 
  volatile,  ᠬ   뢠  ⨬ ᯥ䨪ﬨ
  ($$R.9.3.1).      ᪨.
        ᫥. ᫨    童 
  ,  ᠬ ந  - ,  ᮧ ⠭
  ,  뢠   ᮢ  童
  ந .  ᮧ   ᯥ䨪
  public.
        믮 ० ஢  ꥪ⮢,
   童.   ᪨ ꥪ⮢, 
  童, 믮 ०, 祬    ᮢ.
    㠫  ᮢ 믮 ०,
  祬   㠫  ᮢ.  
  㠫  ᮢ 믮  浪, ⭮ 
  ᠭ  ந .  㠫 
  ᮢ 믮  浪, ⭮    室
  ᭨  ᫥-ࠢ 横筮 ࠢ  
  ᮢ.  "᫥-ࠢ" 砥 冷  
   ᮢ,    ᠭ   ந .
       ⮢ ᨢ 뢠  浪,
  ⭮ 맮   ஥.
        㠫.
        뢠 㭪-童, . $$R.12.7.
     ꥪ   ஬    童 ꥤ.
      뢠   ᫥ :
     (1)  祧    ꥪ auto ($$R.3.5)
      ६ ꥪ ($$R.12.2, $$R.8.4.3);
     (2)  襭 ணࠬ ($$R.3.4)  ஥ ᪨
     ꥪ⮢ ($$R.3.5);
     (3)  饭  樨 delete ($$R.5.3.4)  ꥪ⮢,
     ᮧ   樨 new ($$R.5.3.3);
     (4)   맮.
    뢠 樥 delete,   ᢮
    ᠬ 襣  ந ᮢ ($$R.12.6.2) ⮣
  ꥪ,  ᯮ짮  delete() ($$R.5.3.4),
  ਬ:

             class X {
               // ...
             public:
               X(int);
               ~X();
             };

             void g(X*);

             void f()     // 騩 砩
             {
               X* p = new X(111);   // ࠧ饭  樠
               g(p);
               delete p;            // ᢮  㤠
             }

   맮 ஢ ਬ ।. ਬ஬ ⮣ 
  㦨 맮   ꥪ⮢, ᮧ  ன
  । ᭮    樨 new. 饭
  ꥪ⮢  । ᭮ ࠭⢥  ᫥饥
  㭨⮦   ॡ  ᯮ짮 ᯥ᪨
  ⥩    ࠢ쭮 㭪樮஢ ⨢
  . ਢ ਬ:

       void* operator new(size_t, void* p) { return p; }

       void f(X* p);

       static char buf[sizeof(X)];

       void g()     // ।, ᯥ樠 砩
       {
         X* p = new(buf) X(222);  // ࠧ饭  buf[]  樠
         f(p);
         p->X::~X();              // 㤠
       }

    祭, ᯮ짮   맮 , 
  ᯮ짮    ⮣ ⨯, ਬ,

            int* p;
            // ...
            p->int::~int();

  ᯮ짮 ⠪   ⨯,  ண  ,
  室 ᫥. ᪠ ⠪ ,  ࠧ蠥 짮⥫
   ணࠬ,  뢠  ⥬,    ⨯
  .

  R.12.5  

   ᮧ ꥪ   樨 new,  祭 ᢮
   뢠 () 㭪 operator new() ($$R.5.3.3).
      ᫨ 㭪 operator new()   믮 , 
  頥 0.
        X 㭪 X::operator new()  ᪨ 童,
   ᫨   ᠭ   static.   ࠬ 
   ⨯ size_t, - 騩  ॠ樨 楫᫥ ⨯,
   ।  ⠭⭮ 筮 䠩 <stddef.h>, 
     祭 ⨯ void*, ਬ:

             class X {
               // ...
               void* operator new(size_t);
               void* operator new(size_t, Arena*);
             };

     ࠢ 롮 室饩 㭪樨 operator new() 㦤
   $$R.5.3.3.
       X 㭪 X::operator delete()  ᪨
  童,  ᫨   ᠭ   static.   ࠬ
    ⨯ void*    ன ࠬ ⨯
  size_t.     - 祭  ⨯
  頥 祭   void, ਬ:

             class X {
               // ...
               void operator delete(void*);
             };

             class Y {
               // ...
               void operator delete(void*, size_t);
             };

       ⮫쪮  㭪 operator delete(),
    㭪    ॣ㦥. 쭠 㭪
  operator delete()  ⢥ ࠬ ⨯ void*.
     ᫨ 㭪 ᠭ   ଠ묨 ࠬࠬ,  뢠
    ࠬࠬ, ன   뢠 ࠧ 㤠塞
  ꥪ. । ࠧ ।   
  (᫨  )   ⨯ (᪮) 㪠⥫  㤠塞
  ꥪ.  ன ४⭮, ᫨ ⨯ 㪠⥫, 
   䠪᪨ ࠬ, 㤥 ᮢ  ⨯ ꥪ (  㤥,
   ਬ,  ⨯ 㪠⥫   ) , ᫨
   ⨯  ⨯ 㪠⥫     㠫
  ஬.
      ᨢ ꥪ⮢ ⨯  ᯮ  㭪樨
  operator new()  operator delete() ($$R.5.3.3, $$R.5.3.4).
     ᪮ 㭪樨 X::operator new()  X::operator delete()
  ᪨,     㠫묨. 㭪
  operator delete(),  뢠    ᢮
  , 롨ࠥ   ࠢ ⥩ ,
  ਬ:

             struct B {
               virtual ~B();
               void* operator new(size_t);
               void operator delete(void*);
             };

             struct D : B {
               ~D();
               void* operator new(size_t);
               void operator delete(void*);
             };

             void f()
             {
               B* p = new D;
               delete p;
             }

   ⮬ ਬ   ꥪ  D 뤥  
  D::operator new(),    㠫쭮 ,
  ᢮   D::operator delete().

  R.12.6 樠

  ꥪ   ஢,    饭 童,
   㠫 㭪権    ᮢ  樠஢
    ᯨ᪠ 樠஢ ($$R.8.4.1). ꥪ  
  ஬  樠஢   ⠭
   ($$R.12.1). ⠭  ᯮ 
  ꥪ⮢,   室  樠樨.

  R.12.6.1  樠

  ꥪ ᮢ  ࠬ ($$R.12.1)  樠஢
  ᯨ᪮ ࠦ, 祭  ᪮.  ᯨ᮪ ⠥
  ᯨ᪮ 䠪᪨ ࠬ஢  맮 , ந饣
  樠. ,  ⢥ 樠   
  樨 =  祭.  ᯮ  䠪᪨ ࠬ
    ஢. 筮    맮
   ஢, ਬ:

             class complex {
               // ...
             public:
               complex();
               complex(double);
               complex(double,double);
               // ...
             };

             complex sqrt(complex,complex);

             complex a(1);             // 樠 맮
                                       // complex(double)
             complex b = a;            // 樠 ஢ `a'
             complex c = complex(1,2); //  complex(1,2)
                                       // 뢠 complex(double,double)
                                       //    `c'
             complex d = sqrt(b,c);    // 뢠 sqrt(complex,complex),
                                       // १   `d'
             complex e;                // 樠 맮 
             complex f = 3;            // complex(3), 뢠
                                       // complex(double)  १
                                       //   `f'

  ॣ㧪 樨 ᢠ =  뢠 ﭨ 
  樠.
     樠, ந室  । 䠪᪨ ࠬ஢
      㭪樨, ⭠ 樠樨 

             T x = a;

  樠, ந室  ࠦ 樨 new ($$R.5.3.3) 
   樠樨  ᮢ  童, ⭠
  樠樨 

             T x(a);

      ᨢ ꥪ⮢   ࠬ ᯮ 
  樠樨 ($$R.12.1)      ꥪ⮢.
  ᫨ ,  樠஢  ᯨ᪥ , 祬 ⮢
  ᨢ, ᯮ ⠭  ($$R.12.1). ᫨ 
  , ᯨ᮪ 樠஢   . ਢ ਬ:

             complex cc = { 1, 2 }; // 訡: 室
                                    // ᯮ짮 
             complex v[6] = { 1,complex(1,2),complex(),2 };

   v[0]  v[3] 樠 祭 complex::complex(double),
  v[1] 樠 complex::complex(double,double),  v[2],
  v[4]  v[5] 樠஢ complex::complex().
     ꥪ  M   童  X    ᫥
  砥:
    (1) M   ;
    (2) M  ⠭ ;
    (3) X        樠-ctor
        ($$R.12.6.2)  童 M.
   砥 2  ᮧ ⠢ ꥪ 뢠 ⠭
  . ᫨ 童 ⠢ ꥪ  ,  
  뢠  㭨⮦ ⠢ ꥪ.
        ᪨ ꥪ⮢ 뢠 
  ⮬ 浪,      ⥪ ணࠬ, 
  뢠  ⭮ 浪, . ⠪ $$R.3.4, $$R.6.7,
  $$R.9.4.


  R.12.6.2 樠 童   ᮢ

   ।    樠 
   ᮢ  童,  ᫥㥬   ᮢ. 
  ᮡ    ꥪ⮢, ⠭  뫮,  
  ࠧ ᥬ⨪ ᢠ  樠樨. 
  樠-ctor  

             樠-ctor:
                  : ᯨ᮪-樠஢-童

             ᯨ᮪-樠஢-童:
                  樠-童
                  樠-童 , ᯨ᮪-樠஢-童

             樠-童:
                  -- ( ᯨ᮪-ࠦ opt )
                  䨪

  ᮪ ࠬ஢ ᯮ  樠樨 ᪨ 童
   ꥪ⮢  .  ⢥ ᯮᮡ 樠樨
  ᪨ 童,  뫪  ꥪ⠬ ⨯ const,
  ਬ:

            struct B1 { B1(int); /* ... */ };
            struct B2 { B2(int); /* ... */ };

            struct D : B1, B2 {
                D(int);
                B1 b;
                const c;
            };

            D::D(int a) : B2(a+1), B1(a+2), c(a+3), b(a+4)
            { /* ... */ }
            D d(10);

     砫 樠    浪  ᠭ
  (ᨬ  浪 樠஢-童), ⥬  ⮩ 
  奬 樠 童,   믮 ⥫ D::D()
  ($$R.12.1). 冷 ᠭ 뤥ন  ⮣, ⮡ ࠭஢,
    ꥪ  童  㭨⮦  浪, ⭮
   樠樨.
     ᮡ 砩 ।⠢ 㠫  .  ᮧ
  ०, 祬  㠫     ⮬  浪,
      室 ᭨  ᫥-ࠢ 横筮
  ࠢ   ᮢ. 冷 "᫥-ࠢ" - 
  ,  ஬   ᮢ   ᠭ 
  ந .
      뢠 ꥪ,     ꥪ⮬,
  ।⠢騬   .  ⠪ ꥪ
  뢠 訬 ந ᮬ ꥪ.  
  ꥪ 㠫  ᮢ 樠  
   襣 ந . ᫨  
  襣 ந    樠-童 
  㠫쭮  , ⮣  㠫  
    ⠭ ,   
  . 直 樠-童  㠫쭮 
  ,       ꥪ, .
  ਢ ਬ:

             class V {
             public:
               V();
               V(int);
               // ...
             };

             class A : public virtual V {
             public:
               A();
               A(int);
               // ...
             };

             class B : public virtual V {
             public:
               B();
               B(int);
               // ...
             };

             class C : public A, public B, private virtual V {
             public:
               C();
               C(int);
               // ...
             };

             A::A(int i) : V(i) { /* ... */ }
             B::B(int i) { /* ... */ }
             C::C(int i) { /* ... */ }

             V v(1);  // use V(int)
             A a(2);  // use V(int)
             B b(3);  // use V()
             C c(4);  // use V()

     樠-童     ,
   ஬  . ਬ,  ᫥饬 ࠣ

             class X {
               int a;
             public:
               const int& r;
               X()::r(a) { }
             };

  X::r 樠   ꥪ  X 뫪  X::a.

  R.12.7   

       뢠 㭪-童. 
  ᫥,   뢠 (।⢥  ᢥ)
  㠫 㭪樨. 뢠 㭪   ।
    ᠬ       ,
      㭪樥,     ந .
  ⨬ ᯥ稢 ,   ᮧ ꥪ  
  ᯮ짮  믮   . ᬮਬ
  ਬ:

              class X {
              public:
                virtual void f();
                X() { f(); }  // 맮 X::f()
                ~X() { f(); } // 맮 X::f()
              };

              class Y : public X {
                int& r;
              public:
                void f()
                {
                  r++; // , ᫨ `r'  樠஢
                }
                Y(int& rr) ::r(rr) { }
              };

       ।⢥  ᢥ 맮  
  ⮩ 㠫쭮 㭪樨  樠㥬 ꥪ ।,
  ᫨ ⮫쪮   ᯮ짮 筥  㭪樨 ($$R.10.3).

  R.12.8 ஢ ꥪ⮢ 

  ꥪ   ஢  ᯮᮡ:  ᢠ
  ($$R.5.17),  樠樥 ($$R.12.1, $$R.8.4),  
  ந室  । ࠬ஢ ($$R.5.2.2) 
  १ 㭪樨 ($$R.6.6.3).   X   樨
  楯㠫쭮 ॠ   ᢠ  
  ஢ ($$R.12.1).  ணࠬ  ।    ,
   . ᫨ 짮⥫  ।   ணࠬ,   
    童  X । ᮮ⢥⢥  ᢠ
   童  樠  童.
      ᫨      童  X  
  ஢,  ஬ ⨬  ⢥ ࠬ ꥪ ⨯
  const,  ஦  ஢  X 㤥 
  ⢥ ࠬ ⨯ const X&  뢠 ⠪:

             X::X(const X&)

      ,   㤥 ⢥ ࠬ ⨯ X&:

             X::X(X&)

   樠 ஢ ꥪ⮢ ⨯ const  X 㤥
  .
     筮, ᫨     童  X 
   ᢠ, ᪠ ࠬ ⨯ const, ⮣
  ஦  X  ᢠ 㤥  ⢥
  ࠬ ⨯ const X&  뢠 ⠪:

             X& X::operator=(const X&)

      ,   㤥 ⢥ ࠬ ⨯ X&:

             X& X::operator=(X&)

   ᢠ ஢ ꥪ⮢  X ⨯ const 㤥
  . ⠭⭠  ᢠ 頥 뫪
   ꥪ,  㦭 뫮 ஢.
      ꥪ, ।⠢騥 㠫  , 
  樠஢ ⮫쪮  ࠧ   ஦
   ஢. ꥪ, ।⠢騥 㠫
   , ᪠ ᢠ  ⮫쪮  ࠧ  
  ஦ 樨 ᢠ.
      ᢠ  童  樠  童 
  ᫥饥: ᫨  X   ⢥ 童  M,  ॠ樨
  ᢠ  樠樨 童 ᯮ 樨 ᢠ
   M   ஢ M ᮮ⢥⢥. ᫨  
  童 ⨯ const,  童, 騩 뫪,  童  
   ⠪ ,  㭪 operator=()  ⭮,
     ⠭⭠  ᢠ    ᮧ.
  筮, ᫨ 童     M  
   ஢,  ⠭  ஢ 
  ⠪     ᮧ.
         室  ।, ⠭ ᢠ
    ஢  ⮫쪮 ᠭ (..  㤥 ᮧ
  ⥫ 㭪樨). 묨 ᫮, 㭪 X::operator=() 㤥 ஦
  ⮫쪮 ⮣,    ᠭ 権 ᢠ,  ꥪ
   X ᢠ ꥪ  X  ꥪ , ந
   X,    㭪樨 X::operator=(). 筠 
   樠樥.
      ᫨ ᢠ   ஢ ᠭ , 
    騬 㭪ﬨ-童   ᢠ  
  X । ⠪ ࠧ,   १⮬  뫪
  ⨯ X&  ꥪ, ஬ ᢠ.
      ᫨   X  㭪 X::operator=(), ࠬ஬ ன
   ᠬ  X,  ⠭⭮ ᢠ  㤥
  ஦. ᫨   । - 
  ஢,  ⠭  ஢  㤥
  ஦. ਢ ਬ:

           class X {
             // ...
           public:
             X(int);
             X(const X&, int = 1);
           };

           X a(1);     // 맮 X(int)
           X b(a,0);   // 맮 X(const X&,int)
           X c = b;    // 맮 X(const X&,int)

      ᢠ ꥪ⮢  X । १ 㭪
  X::operator=(const X&).  砥 ($$R.12.3),  ꥪ
  ந   ᢠ ꥪ⠬ 饣 
  , ਬ:

           class X {
           public:
             int b;
           };

           class Y : public X {
           public:
             int c;
           };

           void f()
           {
             X x1;
             Y y1;
             x1 = y1;  // ଠ쭮
             y1 = x1;  // 訡
           }

     ⮬ ਬ y1.b ᢠ x1.b,  x1.c  .
      ஢  ꥪ  㣮   ⠭⭮
  樨 ஢  ⠭⭮  ஢
      ꥪ⮢. ਢ ਬ:

            struct s {
              virtual f();
              // ...
            };

            struct ss : public s {
              f();
              // ...
            };

            void f()
            {
              s a;
              ss b;
              a = b;     //  ᠬ  믮 a.s::operator=(b)
              b = a;     // 訡
              a.f();     // 맮 s::f
              b.f();     // 맮 ss::f
              (s&)b = a; // ᢠ a  b
                         //  ᠬ  믮 ((s&)b).s::operator=(a)
              b.f();     //   맮 ss::f
            }

  맮 a.f() ਢ  맮 s::f() (     ꥪ
   s ($$R.10.2)),  맮 b.f() ਢ  맮 ss::f()
  (      ꥪ  ss).

  R.13 ॣ㧪

  ,   ॣ㦥, ᫨    ᪮쪮 ࠧ
  ᠭ 㭪権    .  ᯮ짮 
  롮 ࠢ쭮 㭪樨 ந ⥬ ᮯ⠢ ⨯
  ଠ ࠬ஢  ⨯ 䠪᪨ ࠬ஢, ਬ:

            double abs(double);
            int abs(int);

             abs(1);   // 맮 abs(int)
             abs(1.0); // 맮 abs(double)

  ᪮   ⨯ T   ᠬ T ,   T& ⨬  
    ⢮ 樠 祭, 㭪樨, ⨯ ࠬ஢
   ࠧ ⮫쪮 ᯮ짮,   ᯮ짮
  뫪,     , ਬ:

             int f(int i)
             {
               // ...
              }

              int f(int& r)  // 訡: ⨯ 㭪権
              {              // 筮 ࠧ
                // ...
               }

  筮, ᪮   ⨯ T  ᠬ T, const T 
  volatile T ⨬     ⢮ 樠
  祭, 㭪樨, ⨯ ࠬ஢  ⫨ ⮫쪮
  㪠 ᯥ䨪樥,     . ,
  ࠧ const T&, volatile T&   T& , ⮬ ⨬
  । 㭪権   ,  ࠧ ⮫쪮
   㪠 ⭮襭. 筮, ⨬ । 㭪権
    , ⨯ ࠬ஢  ࠧ ⮫쪮 
  ⨯  const T*, volatile T*   T*.
          㭪樨,  ⫨
  ⮫쪮 ⨯ 頥 祭.
          㭪樨-童,   
  ᪠,  㣠  ($$R.9.4).
       樨 typedef  ᮧ  ⨯,
   ⮫쪮 । ᨭ ⨯ ($$R.7.1.3), ⮬ 㭪樨,
   ⫨ ⮫쪮   ᯮ짮 ⨯, । 
   typedef,     . ਢ
  ਬ:

          typedef int Int;

          void f(int i) { /* ... */ }
          void f(Int i) { /* ... */ } // 訡: ८। f

   㣮 ஭  ᫥  ࠧ묨 ⨯,   
    ࠧ ॣ㦥 㭪樨, ਬ:

          enum E { a };

          void f(int i) { /* ... */ }
          void f(E i)   { /* ... */ }

      ࠬ஢,  ࠧ ⮫쪮 ⥬,   
  ᯮ 㪠⥫ *,   㣮 ᨢ [],  묨.
  ,   ⨯ ࠬ  ⮫쪮 ன  ᫥騥
   ୮ ᨢ ($$R.8.2.4). ⢥न ᪠
  ਬ஬:

          f(char*);
          f(char[]);       // 筮 f(char*);
          f(char[7]);      // 筮 f(char*);
          f(char[9]);      // 筮 f(char*);
          g(char(*)[10]);
          g(char[5][10]);  // 筮 g(char(*)[10]);
          g(char[7][10]);  // 筮 g(char(*)[10]);
          g(char(*)[20]);  // ⫨筮  g(char(*)[10]);

  R.13.1 ⠢ ᠭ

   ᠭ 㭪権  묨  ⭮    ⮩
   㭪樨, ᫨  室      
   ⨯ ࠬ஢ ($$R.13). 㭪-童 ந
   ⭮    , 祬 㭪-童
     ⥬  . ᬮਬ ਬ:

          class B {
          public:
            int f(int);
          };

          class D : public B {
          public:
            int f(char*);
          };

   D::f(char*) ᪮॥ 뢠 B::f(int), 祬 ॣ㦠 
  㭪.

          void h(D* pd)
          {
            pd->f(1);     // 訡: D::f(char*) 뢠 B::f(int)
            pd->B::f(1);  // ଠ쭮
            pd->f("Ben"); // ଠ쭮, 맮 D::f
          }

  㭪, ᠭ 쭮, 室    , 祬
  㭪  䠩  .

          int f(char*);
          void g()
          {
            extern f(int);
            f("asdf");  // 訡: f(int) 뢠 f(char*) ⮬
                        //  ⥪饩    f(char*)
          }

      ࠧ ਠ⮢ ॣ㦥 㭪樨-童  
  ࠧ ࠢ 㯠, ਬ:

           class buffer {
           private:
             char* p;
             int size;

           protected:
             buffer(int s, char* store) { size = s; p = store; }
             // ...

           public:
             buffer(int s) { p = new char[size = s]; }
           };

  R.13.2 ⠢ ࠬ஢

   맮 㭪樨    ந室 롮  
  㭪権  ⨬ ,  室  ⥪饩  , 
     ८ࠧ ⨯, 騥 맮 .
  롨ࠥ  㭪,   ᮮ⢥ 䠪᪨
  ࠬࠬ.  室   祭 
  㭪権,     ᮮ⢥ 맮  
  䠪᪮ ࠬ.  맮 ⠥ ⨬, ᫨  ⮬
  祭 室 ⮫쪮  童. 㭪, ࠭ ⠪ ࠧ,
     㣮 㭪樨  ⥬   ᮮ⢥⢮
  맮,      ࠬ஢ (易⥫쭮 
  㤥     ࠬ  ࠧ 㭪権).  ⨢ 砥,
  맮 ⠥ ⨬.
       ᮯ⠢ ࠬ஢ ᬠਢ 㭪  ᫮
  ⠭ 祭 ࠬ஢ ($$R.8.2.6), ࠢ n, 
  n+1 㭪権  ࠧ ᫮ ࠬ஢.
      ᮯ⠢ ࠬ஢  㭪-童
  ᬠਢ  㭪,  ⥫ ࠬ,
  㪠뢠騩  ꥪ,  ண 뢠 㭪. 
  ⥫ ଠ ࠬ  ᮯ⠢ 
   ꥪ⮬,   㪠⥫  ꥪ, 묨   樨
  맮 㭪樨-童 ($$R.5.2.4),     ࠭
  ॣ㦥 㭪樨 operator ($$R.13.4).  ⮣ ⥫쭮
  ࠬ  ᯮ  ६ ꥪ⮢,   ⨦
  ᮯ⠢  ந  짮⥫᪨ ८ࠧ
  ⨯.
     ᫨  뢠 童  X, ᯮ 㪠⥫  
  ->,  ⠥,  ⥫ ࠬ  ⨯ const* X 
  童 ⨯ const, volatile* X  童 ⨯ volatile 
  X*   ⠫ 童. ᫨  뢠 㭪-童,
  ᯮ ꥪ   .,  ⠪, ᫨  뢠 㭪
   ࢮ ࠭ ॣ㦥 㭪樨 operator ($$R.9.4),
   ⠥,  ⥫ ࠬ  ⨯: const X& 
  童 ⨯ const, volatile X&  童 ⨯ volatile   X&
    ⠫ 童.  ࠭  ->*  .* ᬠਢ
  ⠪ ,    ࠭  ->  . ᮮ⢥⢥.
       ᯨ᪥ ଠ ࠬ஢ ($$R.8.2.5) 
  ᮯ⠢  䠪᪨ ࠬ஬  ⨯.
       䠪᪮ ࠬ ᪠ ⮫쪮 ⠪
  ᫥⥫쭮 ८ࠧ ⨯,  ᮤন  
   짮⥫᪮ ८ࠧ.   ᮪,
  ᪫稢   ᪮쪮 ८ࠧ,  ᫥⥫쭮,
   ⠪ ਢ  ⨯, ᮯ⠢  ⨯ ᬠਢ
  ଠ쭮 ࠬ.  ᫥⥫쭮 ८ࠧ
  뢠  ᮮ⢥饩 ᫥⥫쭮.
     ਬ, ᫥⥫쭮 int->float->double 
  ८ࠧ int  double,     
  ᮮ⢥饩 ᫥⥫쭮, ᪮   ᮤন
   ⪠ ᫥⥫쭮 int->double.
      ஬ ᠭ  砥, ᫥騥 ਢ
  ८ࠧ  ⨯ T    ᢮⢮ ᫥⥫쭮
    ᮮ⢥饩:

         室 ⨯      ⨯ १
             T                 T&
             T&                T
             T[]               T*
             T(ࠬ)      T(*)(ࠬ)
             T                 const T
             T                 volatile T
             T*                const T*
             T*                volatile T*

  ᫥⥫쭮 ਢ ८ࠧ,  ⫨
  ⮫쪮 浪 ८ࠧ,  ᮢ騬. ⬥⨬,
    㭪権  ଠ ࠬ஬ ⨯ T, const T, volatile T,
  T&, const T&  volatile T& ⨬ 䠪᪨ ࠬ   
  ⮣  ⢠ 祭.  室  ࠧ
  ᫥⥫쭮⥩ ८ࠧ ᯮ ᯥ䨪樨 const 
  volatile,  ᠭ  ࠢ [1] .
      ଠ쭮 ࠬ ⨯ T& ॡ ६ ६
   , ᫨: 䠪᪨ ࠬ   ᮬ,   ⨯,
  ⫨  T,  ⮬ ᫥ ⨯ volatile. 稥 ⠪ ६
     ᮯ⠢ ࠬ஢. ,   
   ⨬ १ ᮯ⠢, .. ६ ६
   ᯮ짮  樠樨 뫮,  
  const ($$R.8.4.3).
     ᫥⥫쭮 ८ࠧ ᬠਢ ᮣ᭮
  ᫥騬 ࠢ:
     [1] 筮 ᮯ⠢. ᫥⥫쭮    
         ਢ ८ࠧ ।⥫쭥  㣨
         ᫥⥫쭮⥩.   ᫮ ᫥⥫쭮⥩
          ।⥫ ,    ८ࠧ
         T*  const T*, T*  volatile T*, T&  const T& 
         T&  volatile T&.
     [2] ⠢  ⠭묨 ८ࠧﬨ ᭮ ⨯.
          ᫥⥫쭮⥩,  ⭮  [1], 
         ।⥫ ,  ᮤঠ ⮫쪮 ⠭
         楫᫥ ८ࠧ ($$R.4.1),
         ८ࠧ float  double  ਢ ८ࠧ.
     [3] ⠢  묨 ⠭묨 ८ࠧﬨ.
          ᫥⥫쭮⥩,  ⭮  [2], 
         ।⥫ ,  ᮤঠ ⮫쪮 
         ⠭ ८ࠧ ($$R.4.1, $$R.4.2, $$R.4.3, $$R.4.4,
         $$R.4.5, $$R.4.6, $$R.4.7, $$R.4.8)  ਢ
         ८ࠧ.   ᫥⥫쭮⥩ ᫨ A 
           ᢥ 騬    B,
          ८ࠧ B*  A* ।⥫쭥 ८ࠧ B*
          void*  const void*. , ᫨ B   
         ᢥ  ᮬ  C,  ।⥫쭥 ८ࠧ
         C*  B*, 祬 C*  A*,  ।⥫쭥 ८ࠧ C&  B&,
         祬 C&  A&.  ᮢ 㯠  ਩ ⡮
         ८ࠧ 㪠⥫  童 ($$R.4.8).
     [4] ⠢  짮⥫᪨ ८ࠧﬨ.
          ᫥⥫쭮⥩,  ⭮  [3], 
         ।⥫ ,  ᮤঠ ⮫쪮
         짮⥫᪨ ($$R.12.3), ⠭ ($$R.4)  ਢ
         ८ࠧ.
     [5] ⠢  ᮬ.
         ᫥⥫쭮,  ॡ ᮯ⠢  ᮬ,
           ।⥫묨.
     짮⥫᪨ ८ࠧ 롨, 室  ⨯
  ६,  樠  ன ᢠ
  祭.

          class Y {
            // ...
          public:
            operator int();
            operator double();
          };

          void f(Y y)
          {
            int i = y;    // 맮 Y::operator int()
            double d;
            d = y;        // 맮 Y::operator double()
            float f = y;  // 訡: 筮
          }

    ⠭ ८ࠧ ($$R.4)  ਬ  ࠬ,
    짮⥫᪮ ८ࠧ, ⠪  ᫥ .

          struct S { S(long); operator int(); };

          void f(long), f(char*);
          void g(S), g(char*);
          void h(const S&), h(char*);

          void k(S& a)
          {
            f(a);    // f(long(a.operator int()))
            g(1);    // g(S(long(1)))
             h(1);   // h(S(long(1)))
          }

  ᫨  ࠬ ॡ 짮⥫᪮ ८ࠧ,  
  뢠  ⠭ ८ࠧ,  
  ࠣ  ࠬ, ਬ:

          class x {
          public:
             x(int);
          };

          class y {
          public:
             y(long);
          };

          void f(x);
          void f(y);

          void g()
          {
            f(1);  // 筮
          }

   맮 f(1) 祭. ᬮ  ,   맮
  f(y(long(1))) ॡ   ⠭⭮ ८ࠧ ,
  祬  맮 f(x(1)), ன 맮   ।⥫.
     ८ࠧ    ($$R.12.1)   
  㭪樨 ८ࠧ ($$R.12.3.2) ࠢࠢ.

          struct X {
            operator int();
          };

          struct Y {
            Y(X);
          };

          Y operator+(Y,Y);

          void f(X a, X b)
          {
             a+b;  // 訡, 筮:
                   //   operator+(Y(a), Y(b)) 
                   //   a.operator int() + b.operator int()
          }

  R.13.3  ॣ㦥 㭪樨

   㭪    ᯮ  ࠬ஢, ।
   㭪権  ⠪   ⥪饩   롨ࠥ
  ⢥,  筮 ᮮ⢥ 祭. 祭
   :
         樠㥬 ꥪ ($$R.8.4);
           樨 ᢠ ($$R.5.17);
         ଠ ࠬ 㭪樨 ($$R.5.2.2);
         ଠ ࠬ 짮⥫᪮ 樨 ($$R.13.4);
         ⨯ 祭, 頥 㭪樥 ($$R.8.2.5).
    ⬥⨬,  ᫨ f()  g()  ॣ㦥묨 㭪ﬨ, 
   ࠢ쭮 樨 f(&g)  ⭮ ࠦ
  f(g) 㦭 ᬮ 祭  롮  f()  g().
  ਢ ਬ:

         int f(double);
         int f(int);
         int (*pfd)(double) = &f;
         int (*pfi)(int) = &f;
         int (*pfe)(...) = &f;   // 訡: ᮮ⢥⢨ ⨯

  ᫥ 樠 訡筠,  - 筮, 
  ⮬,   ।   㭪樨 f() ⨯ int(...).
     ⬥⨬,     ⠭⭮ ८ࠧ
  ($$R.4) 㪠⥫  㭪  ⨯  㪠⥫  㭪
  㣮 ⨯ ($$R.4.6).  ⭮,  ᫨ B  騬
   ᮬ D,  ᫥騥 樠樨 ⨬:

         D* f();
         B* (*p1)() = &f;     // 訡

         void g(D*);
         void (*p2)(B*) = &g; // 訡

  R.13.4 ॣ㦥 樨

  ॣ㦠  設⢮ 権.

       -㭪樨-:
           operator 

       :  
                 new delete
                 +   -   *   /   %   ^   &   |   ~
                 !   =   <   >   +=  -=  *=  /=  %=
                 ^=  &=  |=  <<  >>  >>= <<= ==  !=
                 <=  >=  &&  ||  ++  --  ,   ->* ->
                 ()  []

   ᫥ 樨 -  맮 㭪樨 ($$R.5.2.2)  
  ($$R.5.2.1).
       ॣ㦠 ᫥騥 ( , ⠪  㭠)
  樨:

              +  -  *  &

       ॣ㦠 ᫥騥 樨:

            .  .*  ::  ?:  sizeof

   ⠪  ᯥ樠 ᨬ ९ #  ## ($$R.16).
    筮 㭪樨, 騥 樨 (㭪-)  뢠
  ,     믮 権 ($$R.13.4.1, $$R.13.4.2).
  ,     , ਬ:

           complex z = a.operator+(b);  // complex z = a+b
           void* p = operator new(sizeof(int)*n);

    樨 new  delete ᠭ  $$R.5.3.3  $$R.5.3.4   
   ⭮ 塞  ࠢ.
    㭪-   㭪樥-童    ࠩ
    ࠬ ⨯   뫪  .  
  ਮ, 冷 믮  ᫮ ࠭ 樨, 
    ।। 祭 ⠪ 権:  =,
  㭠ୠ &  ,(⮩), ᫨  ਬ  ꥪ ⨯ .
   ᪫祭 㭪樨 operator=(), 㭪- ᫥.
  ࠢ  operator=()   $$R.12.8.
     ⭮  権  ᭮묨 ⨯
  (ਬ, ++a ⭮ a+=1)   ࠭  ⠪
   権  ᠬ.   権 ॡ, ⮡
   砥 ᯮ짮 ᭮ ⨯ ࠭  ᮬ (ਬ,
   +=).  ॡ   , ᫨   
  ᠬ.
     ॣ㦥     ⠭ 祭
  ࠬ஢ ($$R.8.2.6).
     樨,    㪠  $$R.13.4.3-$$R.13.4.7,
     㭠   樨, 稭騥
  ࠢ, ਢ  $$R.13.4.1  $$R.13.4.2.

  R.13.4.1  樨

  䨪 㭠      ᪮
  㭪樨-童 ($$R.9.3),  ࠬ஢   
  㭪樨,  饩 童,   ࠬ஬.  ࠧ,
   类 䨪᭮ 㭠୮ 樨 @, ࠦ @x 
  ஢  x.operator@()   operator@(x).
  ᫨ ᠭ 㭪樨-  ,     㤥
  ᯮ짮  맮, । ࠢ ᮯ⠢
  ࠬ஢ ($$R.13.2). 䨪 㭠 樨, ⠪  ++  -- ,
    $$R.13.4.7.

  R.13.4.2  樨

        ᪮
  㭪樨-童 ($$R.9.3), 饩  ࠬ,   
  㭪樨,  饩 童,   ࠬࠬ.  ࠧ,
   类 ୮ 樨 @ ࠦ x@y  ஢
   x.operator@(y)   operator@(x,y). ᫨ ᠭ
  㭪樨-  ,     㤥 ᯮ짮
   맮, । ࠢ ᮯ⠢ ࠬ஢ ($$R.13.2).

  R.13.4.3 ᢠ

  㭪 ᢠ operator=()   ᪮
  㭪樥-童.   ᫥ ($$R.12.8).  ⮣, ᫨
  짮⥫  ।   X 㭪 operator=, 
  ᯮ ⠭⭠ 㭪 operator=,  ।
   ᢠ  童   X.

       X& X::operator=(const X& from)
       {
           // ஢  童 X
       }

  R.13.4.4 맮 㭪樨

  맮 㭪樨   :
          ࢨ筮-ࠦ ( ᯨ᮪-ࠦ opt )
   ⠥ ୮ 樥,  ன ࢨ筮-ࠦ
  ।⠢  ࠭,  ᯨ᮪-ࠦ ( ⮩),
  - ன ࠭. , 騬 㭪, 㦨 operator(),  맮
  x(arg1,arg2,arg3)  ꥪ  x  
  x.operator()(arg1,arg2,arg3). 㭪 operator()  
  ᪮ 㭪樥-童  x.

  R.13.4.5 

  , ।塞 :
         ࢨ筮-ࠦ [ ࠦ ]
  ⠥ ୮ 樥. ࠦ  樥 x[y]  ꥪ
   x   x.operator[](y). 㭪 operator[]
    ᪮ 㭪樥-童  x.

  R.13.4.6   童 

    童  ।   樨 ->:
         ࢨ筮-ࠦ -> ࢨ筮-ࠦ
   ⠥ 㭠୮ 樥.  ꥪ  x ࠦ x->m
    (x.operator->())->m.  ᫥, 
  㭪 operator->()    㪠⥫  , 
  뫪  ,  ꥪ ,  ண । 㭪
  operator->().    ᪮ 㭪樥-童 .

  R.13.4.7 ६  ६

  㭪   operator++    ࠬ஬   ꥪ⮢
  ண   䨪᭮ ६ ++. 㭪 
   operator++     ࠬࠬ   ꥪ⮢
  ண   䨪᭮ ६ ++.  䨪᭮
  樨 ++ ன ࠬ   ⨯ int, ,
    ࠦ 砥  䨪᭮ ६,
  㭪 operator++ 뢠   ࠬ஬, ࠢ .
  ਢ ਬ:

           class X {
           public:
             X operator++();   // 䨪᭠ ++a
             X operator++(int) // 䨪᭠ a++
           };

           void f(X a)
           {
             ++a;    // a.operator++();
             a++;    // a.operator++(0);

             a.operator++();  //  맮:   ++a;
             a.operator++(0); //  맮:   a++;
           }

     䨪  䨪 樨 ६ -- ।
   ࠧ.


   R.14  

   R.14.1  ⨯

    ⨯ । 楫 ᥬ⢮ ⨯  㭪権.

          ᠭ-蠡-⨯:
             template < ᯨ᮪-ࠬ஢-蠡-⨯> ᠭ

          ᯨ᮪-ࠬ஢-蠡-⨯:
               ࠬ-蠡-⨯
               ᯨ᮪-ࠬ஢-蠡-⨯ , ࠬ-蠡-⨯

          ࠬ-蠡-⨯:
               ࠬ-⨯
               ᠭ-ࠬ

          ࠬ-⨯:
               class 䨪

   ᠭ  ᠭ-蠡-⨯  ᮤঠ
  ᠭ  । 㭪樨  .
     樨 ࠬ-⨯ 䨪 ।  -⨯
     ᠭ 蠡 ⨯.
     蠡 ⨯ 稭  ࠢ  ⥩
    ஫ 㯠.  ᠭ-蠡-⨯
  ⠥ ᠭ.   ⢮  ணࠬ ⮫쪮
   쭮 ᠭ.

  R.14.2  ⨯  ᮢ

   ⨯   ।   ந  ,  
  ⮬,  ᠭ  ।   ந ꥪ ⮣
  .  ⨯   vector   ᫥騬 ࠧ:

            template<class T> class vector {
               T* v;
               int sz;
            public:
               vector(int);
               T& operator[](int);
               T& elem(int i) { return v[i] }
               // ...
            };

  䨪 template<class T> 뢠,  뢠 蠡 ⨯,
     ⮬ ᠭ ᯮ -⨯ T, 묨 ᫮,
  vector -  ࠬਧ ⨯  ࠬ஬ T.
          樨 -蠡-:
           -蠡-:
               -蠡-⨯ < ᯨ᮪-ࠬ-蠡-⨯ >

           ᯨ᮪-ࠬ-蠡-⨯:
               ࠬ-蠡-⨯
               ᯨ᮪-ࠬ-蠡-⨯ , ࠬ-蠡-⨯

           ࠬ-蠡:
               ࠦ
               -⨯
      -蠡-   - ($$R.9).
     ,  ஦ 蠡 ⨯  , 뢠
  蠡 ᮬ  ⥭ 筮 , । 
  ᯥ樠  - -蠡-, . $$R.14.5.
     ᫨  樨 -蠡- -蠡-⨯  ।,
    砥 । .
      蠡    㭨  ணࠬ   ᢮
        㣮 蠡 ⨯,
  , 㭪, ꥪ, 祭  ⨯.
     , 㪠  ᯨ᪥-ࠬ-蠡-⨯ 
  -蠡-,  ᮮ⢥⢮ ⨯, 
   ᯨ᪥-ࠬ஢-蠡-⨯  蠡-⨯. ( ᪠,
     䠪᪨ ࠬࠬ 蠡 ⨯,  
  - ଠ묨.)
     ஬ ⨯  ᯨ᪥-ࠬ-蠡-⨯  :
  ࠦ-⠭,  ꥪ⮢  㭪権,  譥
  뢠, ᪨ 童 ᮢ.  ࠬ஢, 
   ⨯, ॡ 筮 ᮮ⢥⢨ ($$R.13.2).
     ਢ ਬ ᯮ짮 ᮢ 蠡 ⨯ vector:

            vector<int> v1(20);
            vector<complex> v2(30);

            typedef vector<complex> cvec; // cvec ⠭ ᨭ
                                          // vector<complex>
            cvec v3(40);  // v2  v3  ⨯

            v1[3] = 7;
            v2[3] = v3.elem(4) = complex(7,8);

     vector<int>  vector<complex>  蠡묨 ᠬ,
    ।   㬮砭  蠡 ⨯ vector.
    ᪮ 蠡--  -,   
  ᯮ짮 ⠬,  ⨬ -, ਬ:

            class vector<Shape*>

            vector<Window>* current_window;

            class svector : public vector<Shape*> { /* ... */ };

    । 㭪樨-童 蠡    $$R.14.6.

  R.14.3 ⭮ ⨯

   樨 蠡--      ,
  ᫨   ᮢ  蠡 ⨯  祭 㪠
  ࠬ஢. ਬ,  ᫥ ᠭ x  y  ⨯,
   ⫨祭  ⨯ z:

            template<class E, int size> class buffer;

             buffer<char, 2*512> x;
             buffer<char,1024> y;
             buffer<char,512> z;

   ਢ ᠭ,    ⨯  x2  x3.
   ⫨砥  ⨯ x1  x4:

             template<class T, void(*err_fct)()>
                class list { /* ... */ };

             list<int,&error_handler1> x1;
             list<int,&error_handler2> x2;
             list<int,&error_handler2> x3;
             list<char,&error_handler2> x4;

  R.14.4  ⨯  㭪権

   ⨯  㭪樨 ।  㤥 ந 㭪. ਬ,
  ᥬ⢮ 㭪権 sort   ᫥騬 ࠧ:

             template<class T> void sort(vector<T>);

   ⨯  㭪樨 ஦ ࠭祭 ⢮ ॣ㦥
  㭪権. 㭪, ஦ 蠡 ⨯  㭪権, 뢠
  蠡 㭪樥.  ⭠ 㭪樨,  ᠭ ன 㪠
  ⨯, ᮮ⢥騩 蠡, . $$R.14.5.
      맮 蠡 㭪樨 ࠬ 蠡 ⨯  
  ,  ⮣ ਬ ࠢ ࠧ襭 ।
  ॣ㦥 㭪権. ᬮਬ ਬ:

             vector<complex> cv(100);
             vector<int> ci(200);

             void f(vector<complex>& cv, vector<int>& ci)
             {
               sort(cv);   // 뢠 sort(vector<complex>)
               sort(ci);   // 뢠 sort(vector<int>)
             }

       㭪   ॣ㦥  묨, ⠪ 
  蠡묨 㭪ﬨ  ⥬  .  ࠧ襭 ।
  蠡   㭪権    ⥬   
  ᫥⥫쭮 ன  蠣:
     [1]   筮 ᮯ⠢ 맮 ($$R.13.2) 㭪,
          ᫨  , 맢 .
     [2]   蠡 ⨯  㭪権,  ஬
          ᮧ 筮 ᮯ⠢  ᬠਢ 맮
         㭪. ᫨ 㤠 ,  맢 㭪.
     [3]  ਬ 筮 ࠢ ࠧ襭 ।
         ॣ㦥 㭪権 ($$R.13.2). ᫨   
         㭪 , 맢 .
  ᫨   ᮯ⠢ 㭪樨, 맮  訡.
  ᫨ 㦥  ࢮ 蠣    ,
  ᮯ⠢   㭪樥,  맮 ⠪ ⠥ 
   訡.
      ᯥ譮 믮 蠣 [2] ਢ  ᮧ ன
  蠡 㭪樨  ࠬࠬ ($$R.14.5), ⨯  筮
  ᮯ⠢  ⨯ ࠬ஢, 㪠  맮.  ⮬ 砥
  ⨬ 宦    ਢ ८ࠧ ($$R.13.2).
       ⢨ ਬ  ᮯ⠢ ⨯ 㪠⥫
   㭪樨 ($$R.13.3).
     ᬮਬ ਬ:

           template<class T> T max(T a, T b) { return a>b?a:b; };

           void f(int a, int b, char c, char d)
           {
             int m1 = max(a,b);   // max(int a, int b)
             char m2 = max(c,d);  // max(char c, char b)
             int m3 = max(a,c);   // 訡:  ᮧ max(int,char)
           }

       ⮬ ਬ ᠭ

           int max(int,int);

   ࠧ ।  쥣 맮, ᪮ ⥯
   㭪,  ᫥ ⠭⭮ ८ࠧ char  int,
   ᮯ⠢  맮 max(a,c).
     ।  蠡 ⨯  㭪樨 ᯮ  ᮧ
  ࠧ ਠ⮢ 蠡 ⨯.  맮 । ਠ
  筮  ᠭ 蠡 ⨯.
      ࠬ-蠡-⨯,  ਢ 
  ᯨ᪥-ࠬ஢-蠡-⨯  易⥫쭮 ᯮ짮 
   ⨯ ࠬ஢  蠡 ⨯  㭪樨.

            template<class T> T* create(); //訡

            template<class T>
                void f() { // 訡
                   T a;
                   // ...
                }

   ࠬ-蠡-⨯, ਢ  蠡 ⨯  㭪樨,
    ࠬࠬ-⨯.

  R.14.5 ᠭ  ।

     蠡 ⨯  ணࠬ  ⢮ ⮫쪮
   ।. ᠭ   ᪮쪮. ।
  ᯮ  ᮧ ᯥ樠 蠡 ᮢ  蠡
  㭪権,   ᮮ⢥⢮ 蠡 ⨯.
       -蠡-  ᠭ 蠡 .
      맮 蠡 㭪樨  ⨥    ᠭ
  蠡 㭪樨.  맮    蠡 㭪樨
   몥  ᮡ ᮣ襭:  蠡 㭪樨
  ᯮ 筮 ⠪    筮 㭪樨. ᠭ 㭪樨
   ⠪  ,   蠡 㭪樨,   ᮯ⠢묨 ⨯
  ࠬ஢,  ᠭ ᯥ樠쭮 蠡 㭪樨.
      ᫨  믮  権 ॡ ।
  ᯥ樠쭮 蠡   ᯥ樠쭮 蠡 㭪樨,
   ᫨ ⠪ ।  ணࠬ ,   㤥 ᮧ.
      । 筮 (蠡) 㭪樨  ⨯, 
  筮 ᮯ⠢  ⨯  ᠭ 蠡 㭪樨,
  ⠥ । ᯥ樠쭮 蠡 㭪樨. ᬮਬ
  ਬ:

            template<class T> void sort(vector<T>& v) { /* ... */ }

            void sort(vector<char*>& v) { /* ... */ }

   । 㭪樨 sort 㤥 ᯮ짮  ⮩ 㭪樨
   ᥬ⢠ sort,  ᮯ⠢  맮  ⨯
  ࠬ vector<char*>.  㣨 ⨯ vector 㤥 ᮧ
  ᮮ⢥饥  । 㭪樨  蠡 ⨯.
      । ,   蠡 , ਬ:

            template<class T> class stream { /* ... */ };

           class stream<char> { /* ... */ };

   ᠭ  㤥 ᯮ짮  ⢥ ।
  ⮪ ᨬ (stream<char>). 㣨 ⮪  ࠢ
    蠡 㭪権, ᮧ  蠡 ⨯  㭪権.
         ᠭ 蠡 ⨯  ,  樨,
   ॡ । ,    ந 
  蠡 ᮬ. ᫥ ⮣ ᯥ樠 蠡 
  㤥  ।, 祬 ࠧ  ।  
  ᠭ, ᯮ騬  .

  R.14.6 㭪樨-童 蠡 ⨯

  㭪-童 蠡  ⠥  蠡 㭪樥,
   ࠬ 蠡 ⨯    -  蠡묨 ࠬࠬ.
  ਢ ਬ,  ஬ ᠭ  蠡 ⨯  㭪樨:

           template<class T> class vector {
              T* v;
              int sz;
           public:
              vector(int);
              T& operator[](int);
              T& elem(int i) { return v[i]; }
              // ...
           };

  㭪, 믮 ,  । ᫥騬 ࠧ:

           template<class T> T& vector<T>::operator[](int i)
           {
             if (i<0 || sz>=i) error("vector: range error");
             return v[i];
           }

       ࠬ  vector<T>::operator[]() 㤥 
  ⥬ ⨯ vector,  ஬ ਬ  樨.

           vector<int> v1(20);
           vector<complex> v2(30);

           v1[3] = 7;            // vector<int>::operator[]()
           v2[3] = complex(7,8); // vector<complex>::operator[]()

  R.14.7 

  㭪-  蠡 ⨯    蠡 㭪樥,
  ਬ:

           template<class T> class task {
              // ...
              friend void next_time();
              friend task<T>* preempt(task<T>*);
              friend task* prmt(task*);  // 訡
              // ...
           };

   㭪 next_time() ⠭ 㣮  ᮢ task, 
    task   ⢥ 㣠 㭪 preempt() c
  ᮮ⢥騬 ⨯ ࠬ஢. 㭪 preempt() 
  ।  蠡 ⨯.

           template<class T>
              task<T>* preempt(task<T>* t) { /* ... */ }

       ᠭ 㭪樨 prmt()  訡, ᪮ ⨯
  task  ,   ⮫쪮 ᯥ樠 蠡 ⨯
  task<int>, task<record>,  ..

  R.14.8 ᪨ 童  ६

    蠡   㭪樨, ᮧ  蠡
  ⨯, ࠧ ᢮  ᪨ ६  童.
  ᬮਬ ਬ:

            template<class T> class X {
               static T s;
               // ...
            };

            X<int> aa;
            X<char*> bb;

     X<int>  ᪨ 童 ⨯ int,   
  X<char>  ᪨ 童 ⨯ char*.
     筮,  ਢ  ਬ, 㭪 f(int*) 
  ᪨ 童 s ⨯ int,  㭪 f(char**)  ᪨
  童 ⨯ char**:

            template<class T> f(T* p)
            {
               static T s;
               // ...
            }

            void g(int a, char* b)
            {
               f(&a);
               f(&b);
            }

  R.15 ࠡ⪠ ᮡ 権

  R.15.1 ࠡ⪠ ᮡ 権

   ࠡ⪥ ᮡ 権  室 믮 ணࠬ ଠ 
  ࠢ ।  ன 窨 ࠡ稪 ᮡ
  権. ࠡ稪 室  楯窥 믮 맮
  㭪権. ࠢ ࠡ稪 ।  
  ࠦ-᪠, ஥   ⮫쪮  ஢塞-
  ࠡ稪   㭪樨, 맢  ஢塞-.

              ஢塞-:
                   try ⠢- ᯨ᮪-ࠡ稪

              ᯨ᮪-ࠡ稪:
                   ࠡ稪 ᯨ᮪-ࠡ稪 opt

              ࠡ稪:
                   catch ( ᠭ-ᮡ-樨 ) ⠢-

              ᠭ-ᮡ-樨:
                   ᯨ᮪-ᯥ䨪権-⨯ ⥫
                   ᯨ᮪-ᯥ䨪権-⨯ ࠪ-⥫
                   ᯨ᮪-ᯥ䨪権-⨯
                   ...

              ࠦ-᪠:
                   throw ࠦ opt

   ஢塞-  ஬ ($$R.6), 
  ࠦ-᪠ - 㭠 ࠦ ⨯ void ($$R.5). 
  ࠦ-᪠ 뢠 "窮 ᪠",   㭪,  ன
  ⨫ ࠦ-᪠, ,   "᪠ ᮡ
  .  ணࠬ, ன । ࠢ  窨
  ᪠ 뢠 ࠡ稪.

  R.15.2  ᮡ 樨

   ᪥ ᮡ 樨 ࠢ । ࠡ稪. 
  ᮯ஢ ।祩 ꥪ, ⨯ ண ।, 
  ࠡ稪  墠 ᮡ . , ࠦ

             throw "Help!";

    墠祭  ࠡ稪   ⨯ char*:

             try {
               // ...
             }
             catch(const char* p) {
              //  ࠡ뢠 ᮡ   ᨬ ப
             }

   ᮡ  Overflow (९):

             class Overflow {
               // ...
             public:
               Overflow(char,double,double);
             };

             void f(double x)
             {
               // ...
               throw Overflow('+',x,3.45e107);
             }

    墠祭 ࠡ稪

            try {
                  // ...
                  f(1.2);
                  // ...
            }
            catch(Overflow& oo) {
                  //  ࠡ⪠ ᮡ 樨 ⨯ Overflow
            }

       ᪥ ᮡ 樨 ࠢ । 襬
  ࠡ稪 ᮮ⢥饣 ⨯. "訩" -  ࠡ稪,
  ஢塞- ண ᫥ 稫 ࠢ   
   뫮 । 㤠.  ⠪ "ᮮ⢥騩" ⨯
  ।  $$R.15.4.
       믮 ࠦ-᪠ ᮧ ६ ꥪ
  ᪮ ⨯,  㦨 ࠭   throw,
   ꥪ ᯮ  樠樨 ६,
  ᮮ⢥饣 ⨯, ᠭ  ࠡ稪. ᫨  
  ࠭祭  ᮯ⠢ ⨯ (. $$R.15.4)  ᯮ짮
   ६ ६,  ࠭ throw 祭 ࠬ 㭪樨
    맮 ($$R.5.2.2)  ࠭   return.
      ᫨  뫮 ,   ᫠ ணࠬ   ⪠
   맮 ஢  ஢  ६ ꥪ
  ($$R.12.1),  ᮢᥬ  ६ ꥪ,  ᮡ
    뫮  ।⢥ 樠஢  ࠡ稪
  ࠬ஬ ࠦ ᪠.
      ᫨  ࠦ-᪠ ࠭  ,  ந室
  १ ࠡ⪨ ᮡ 樨.  ࠦ-᪠
    ⮫쪮  ᠬ ࠡ稪   㭪樨, 
  ।⢥  । 뢠  .
  ਬ, ࠣ ணࠬ,  믮  ࠡ⪥ ᮡ
  樨, ᫨    ஢  ࠡ, 
  룫拉 ⠪:

          try {
            // ...
          }
          catch (...) { // 墠  ᮡ 権
           //  (筠) ࠡ⪠ ᮡ 権
          throw; // । ⠫ ᮡ 権 㣮 ࠡ稪

        }

  R.15.3   

   ࠢ ।  窨 ᪠ ᮡ 樨
  ࠡ稪,  뢠    ⮬᪨
  ꥪ⮢, ஥   室  ஢塞-.
      ᫨ ꥪ   ஥ ,  
  뢠 ⮫쪮   ஥    ꥪ⮢.
  ஬ ⮣, ᫨ ᮡ  ᪠   
  ஥  ⮬᪮ ᨢ,  㭨⮦ 
  ⮫쪮 㦥 ஥  ⮣ ᨢ.
      맮 ஢  㭨⮦ ⮬᪨
  ꥪ⮢, ஥  室 믮 ணࠬ  砫
  ஢塞-  ࠦ-᪠, 뢠 "稢
  ⥪".

  R.15.4 ࠡ⪠ ᮡ 樨

  ࠡ稪 ⨯ T, const T, T&  const& ᮯ⠢ 
  ࠦ-᪠, 騬 ࠭ ⨯ E, ᫨:
     [1] T  E   ⨯;
     [2] T  㯭 ($$R.4.6)  ᮬ E  窥
         ᪠;
     [3] T  ⨯ 㪠⥫,  E  ⠪ ⨯ 㪠⥫,
            窥 ᪠ ८ࠧ  T  
         ⠭ ८ࠧ 㪠⥫ ($$R.4.6).
     ᬮਬ ਬ:

           class Matherr { /* ... */ virtual vf(); };
           class Overflow : public Matherr { /* ... */ };
           class Underflow : public Matherr { /* ... */ };
           class Zerodivide : public Matherr { /* ... */ };

           void f()
           {
             try {
                g();
             }

            catch (Overflow oo) {
              // ...
            }
            catch (Matherr mm) {
             // ...
            }
          }

   ࠡ稪 Overflow 㤥 墠뢠 樨 ⨯
  Overflow,  ࠡ稪 Matherr 㤥 墠뢠 樨 ⨯
  Matherr   ⨯,  騬 ந묨  Matherr,
   Underflow  Zerodivide.
     ࠡ稪  ஢塞-    ᮡ
  樨  浪  ᠭ. ⠥ 訡 , ᫨ ࠡ稪
     饭 । ࠡ稪  ந ,
  ᪮  ⠪ ᯮ ࠢ   
   ࠡ稪  ந .
      ...  ᠭ-ᮡ-樨  ⠪  , 
   ᠭ ࠬ஢ 㭪樨,  ᮯ⠢   ᮡ
  樥. ᫨  ,  ᯮ騩  ࠡ稪
    ᫥  ஢塞-.
     ᫨  ஢塞-  ந諮 ᮯ⠢   
   ࠡ稪,  ᮮ⢥饣 ࠡ稪 த
   ᪨ ꥬ饬 ஢塞-. ᫨  ᥩ ணࠬ
   ந諮 ᮯ⠢    ࠡ稪, 뢠
  㭪 terminate() ($$R.15.7).
     ᮡ  ⠥ ࠡ⠭ ᫥ 室  ⥫
  ࠡ稪.     "稢 ⥪".

  R.15.5 䨪樨 ᮡ 権

    墠뢠 ᮡ 樨  
  ⢨ 㭪権. ᮪ ᮡ 権,  אַ 
  ᢥ    㭪,     
  ᠭ.  ᯥ䨪-ᮡ-樨
  । ⥫ 㭪樨.

           ᯥ䨪-ᮡ-樨:
                throw ( ᯨ᮪-⨯ opt )

           ᯨ᮪-⨯:
                -⨯
                ᯨ᮪-⨯ , -⨯

  ਢ ਬ:

           void f() throw (X,Y)
           {
             // ...
           }

    ᫨ 㭪 ஡  㪠  ᯨ᪥ ,
  ࠢ । 㭪樨 unexpected(), . $$R.15.8.
     몠    ࠦ ⮫쪮 ⮬,
     ᫥   ᮡ 樨,  㪠
   ᯥ䨪樨-ᮡ 樨 ᠭ 㭪樨. ࠡ⪠ ।
  ᮡ 権 ந室  .
    㭪,  ன  ᯥ䨪-ᮡ-樨,
     ᮡ .
    㭪  ⮩ ᯥ䨪樥-ᮡ-権 (throw())  
  ᪠  ᮡ 権.
    ᫨ 㭪   ᮡ   X,   
    ᮡ   , 饣 騬
  ந ᮬ  X.
     ᯥ䨪-ᮡ-樨  ⭮  ⨯
  㭪樨.

  R.15.6 樠 㭪樨

  堭 ࠢ ᮡ묨 ﬨ ᯮ  ॠ樨  訡
   ᠬ ࠡ⪥ ᮡ 権 㭪樨:

  terminate()  unexpected().

  R.15.6.1 㭪 terminate()

    ।ᬮ७ ࠡ⪨ ᮡ 権 室
  室    ਥ, ਬ:
    -  堭 ࠢ ᮡ묨 ﬨ  ᬮ 
      ࠡ稪  饭 ᮡ 樨;
    -  堭 ࠢ ᮡ묨 ﬨ ⮫
       襭 ன ⥪;
    -  , 맢   ⪨ ⥪  ᪥
      ᮡ 樨, ᠬ ⠥  믮 ணࠬ,
      ⨢ ᮡ .
     뢠 㭪

      void terminate();

    ᢮ । 뢠 㭪,  뫠 㪠  ࠬ
   ᫥ 饭  set_terminate():

      typedef void(*PFV)();
      PFV set_terminate(PFV);

  㭪,  뫠   ।饬 맮 set_terminate(),
  㤥 頥 祭 ⥪饣 맮.  
  짮⥫ ॠ  ⠭ ⥪.  㬮砭
  㭪 terminate() 뢠 abort().
     롮   terminate() ⠪ 㭪樨,  
  ⢨⥫쭮 襭 ணࠬ, ⠥  
  맢 ணࠬ,  訡.

  R.15.6.2 㭪 unexpected()

  ᫨ 㭪,  ᯥ䨪-ᮡ-樨, ᪠
  㪠 ᮡ ,  뢠 㭪

        void unexpected();

    ᢮ । 뢠 㭪,  뫠  
  ࠬ  ᫥ 饭  set_unexpected():

        typedef void(*PFV)();
        PFV set_unexpected(PFV);

  㭪,  뫠   ।饬 맮 set_unexpected(),
  㤥 頥 祭 ⥪饣 맮.  
  짮⥫ ॠ  ⠭ ⥪.  㬮砭
  unexpected() 뢠 terminate(). ᪮  㬮砭
  terminate() 뢠 abort(), १⮬ 㤥 ।⢥
   筮 㦥 訡.

  R.15.7 ᮡ 樨  ࠢ 㯠

     ଠ쭮 ࠬ 樨 catch  ⠪ 
  ࠢ 㯠,    ଠ쭮 ࠬ 㭪樨,  ன
    catch.
     ᪥ ᮡ 樨  㪠뢠 ⠪ ꥪ, 
   ஢  㭨⮦    㭪樨, 
    throw.


  R.16 ९ୠ ࠡ⪠

   몠 ++ 砥 ९  ﬨ
  ய⠭, ᫮ ࠭樨  祭 㪠
  䠩.
      ।  ९ 㦠 ப, 稭騥
   ᨬ # (।    ஡  ᨬ ਧ⠫쭮
  ⠡樨).  ப 뢠 ,   ᨭ⠪
  । ᨬ  ⠫쭮 몠.  
  室    ணࠬ,   ⢨ த
  (ᨬ  ࠢ ⥩  ++)   
   ࠭樨 ($$R.2).
      ९,    ப,  த 
  ᫥饩 ப 室 ⥪, ⨢ ᨬ ⭮
  ஡  ।⢥ । ᨬ  த
  ப. ९  ⮣,  室 ப 㤥 ࠧ 
  ᥬ, 㤠 ᨬ ⭮ ஡    ப.
   ⭮ ஡     ᫥ ᨬ
  室 䠩.
      ᥬ ९ ⭮: ᥬ ᠬ 몠 ($$R.2.1),
   䠩, ஥ ᯮ   #include   
  ᨬ, ⫨  饭 ஡  ᮢ騩   
   ᥬ ९.

  R.16.1  ९୮ ࠡ⪨

   ।  ᪮쪮 䠧 ९୮ ࠡ⪨.
   ⭮ ॠ樨 䠧  ᫨,  १  ࠢ
    ⠪,   뫨 믮  䠧.
    ᫨ .

     室 ᨬ, 騥  ⥬ ᨬ, 騥
   ப,   ⠭ ᨬ  ப. 筮
     騥  ⥬ ᨬ. ।
  ᫥⥫쭮 ᨬ (ਣ)   
   ⤥ ᨬ ($$R.16.2).

      ⠪  ᨬ: ⭠ ஡ , ᫥騩
    ᨬ  ப.  १  ᫨ ப 室
  ⥪,   뫠 㤠  .

    室 ⥪ ࠧ  ᥬ ९  ᫥⥫쭮
  饭 ஡.  ਩    ஡.
  室 ⥪    । ᥬ  .

    믮  ९,  ந ய⠭
  ($$R.16.3, $$R.16.4, $$R.16.5, $$R.16.6, $$R.16.7  $$R.16.8).

     ᨬ ⠭  ப ࠫ 樨 ᯥ樠
  ᨬ   ᢮  ($$R.2.5.2).

    ᥤ ப ࠫ.

    ९୮ ࠡ⪨ ࣠ ᨭ⠪᪮
   ᥬ᪮ , ࠭᫨,  ⥬ 뢠 
  室묨 ⥪  㣨 ணࠬ.

  R.16.2 ਣ ᫥⥫쭮

  ० 祬 筥 -  ९ୠ ࠡ⪠,
   宦 ਣ䭮 ᫥⥫쭮   
  ᨬ  ᮮ⢥⢨  ਢ  ⠡楩.

            ??=  #        ??(  [
            ??/  \        ??)  [
            ??'  ^        ??!  |

  ਬ, ப

        ??=define arraycheck(a,b)  a??(b??) ??!??! b??(a??)

  ८ࠧ 

        #define arraycheck(a,b) a[b] || b[a]

  R.16.3 ம।  ய⠭

   

       #define 䨪 ப-ᥬ

  뢠 ம।.  㪠뢠 ९,  
  ந   ᫥ 宦 䨪  
  ᫥⥫쭮 ᥬ, 뢠 ப . 饭
  ஡, 㦠騥  ᫥⥫쭮 ᥬ, 뢠.
  ਬ,  ।

        #define SIDE 8

  ᠭ

        char chessboard[side][side];

  ᫥ ய⠭ ਬ 

        char chessboard[8][8];

  । ⠪ ᯮᮡ 䨪  ८।
    㣮  #define,   ᫮,  ப
     । ᮢ.  ᨬ 饭
  ஡, ࠧ騥 ᥬ,  묨.
      
  䨪 ( 䨪, ... ,䨪) ப-ᥬ
  뢠 ம।  ࠬࠬ  "㭪樮"
  ம।.   ⨬ ஡  
  䨪஬  ᨬ (. । ⠪ ᯮᮡ
  䨪  ८।   㣮 㭪樮쭮
  ம।,   ᫮,   ஬ ।
    ᫮     ࠬ஢,    ࢮ,  
  ப  ᮢ.  ᨬ 饭 ஡, ࠧ騥
  ᥬ,  묨.
     ᫥騥 宦 䨪, । 
  㭪樮쭮 ம।, ᫨   ᫥ ᨬ
  (, ᫥⥫쭮 ᥬ, ࠧ 묨,  ᨬ
  ),   ப ᥬ  ம।. 饭
  ஡, 㦠騥 ப , 뢠.  宦
  䨪,  ᯨ᪠ ࠬ஢ ம।, 
   ᫥⥫쭮 ᥬ, ।⠢ ᮮ⢥騩
  䠪᪨ ࠬ  ஢맮. ᪨ ࠬࠬ 
  ப ᥬ, ࠧ 묨. ,   窨, 
  室  ᨬ쭮 ⠭    㣫 ᪮,
   ࠧ ࠬ஢. ᫮ 䠪᪨ ࠬ஢ ஢맮 
  ᮢ  ᫮ ࠬ஢ ம।.
     ᫥ 䨪樨 ࠬ஢  㭪樮쭮 ம।
  ந室 ⠭ 䠪᪨ ࠬ஢. ᫥ 믮 ⠭
   ࠬ (᫨  뫨)  ࠬ  ப  頥
  䠪᪨ ࠬ஬  ஢맮 ($$R.16.3.3); ᪫祭
  ⠢ 砨,  ࠬ । ᥬ # ($$R.16.3.1),
     ᥤ ᥬ ## ($$R.16.3.2).
      ਢ ਬ.   ம।

         #define index_mask 0XFF00
         #define extract(word,mask)   word & mask

   ஢맮

         index = extract(packed_data,index_mask);

  ᫥ ⠭ ਬ 

         index = packed_data & 0XFF00;

        ம। ப  ஢  
  稥 㣨 ம। ($$R.16.3.3).

  R.16.3.1  #

  ᫨ ।⢥ । ࠬ஬  ப   ᥬ
  #,   ⠭ ࠬ   #  
   ப ࠫ , ᮤঠ  ᮮ⢥饣 ࠬ
  ஢맮.  ᨬ쭮 ⠭  ப ࠫ, 室
   ࠬ, ।  宦 \  " ⠢ ᨬ \.
       ਬ, ᫨  ம।

          #define path(logid,cmd) "/usr/" #logid "/bin/" #cmd

   ஢맮

          char* mytool=path(joe,readmail);

  ਢ  ⠪ १:

          char* mytool="/usr/" "joe" "/bin/" "readmail";

  ᫥ ⥭樨 ᥤ ப ($$R.16.1) 稬:

          char* mytool="/usr/joe/bin/readmail";

  R.16.3.2  ##

  ᫨  ப    ᥬ,   
  ।⠢ ࠬ ம।,  
  ##,  ᠬ  ##  㦠騥  饭 ஡
  㤠.  ࠧ, १ 樨 ## ⮨ 
  ⥭樨.
       ம।,

          #define inherit(basenum) public Pubbase ## basenum, \
                                   private Privbase ## basenum

  ⮣ ஢맮

          class D : inherit(1) { };

  ਢ  ⠪ १:

          class D : public Pubbase1, Privbase1 { };

     ம।, ஥  ப  ᥤ 
  ##,   ⠭, , १ ⥭樨 
  ᯮ짮  ⠭. ਢ ਬ.  
  ।:

          #define concat(a)    a ## ball
          #define base         B
          #define baseball     sport

   ஢맮

          concat(base)

    १

          sport

    

          Bball

  R.16.3.3  ᬮ  쭥訥 ⠭

  ᫥ ⮣,   ப  ந諠 ⠭  ࠬ஢
  ஢맮, 稢 ப ᬠਢ ୮ 
  㦥 ⥫ ம।. ᫨  
   ᬮ஢ ப    ம।, 
  ⠭    ந室.
      ᨢ ⠭  믮  
  ९,      ⢥ .

  R.16.3.4   ந   #undef

  ᫥  ம। 䨪   ⠥
  ।  ⠥  ⥪饩   (ᨬ 
  ࠢ ⥩   ++)    ࠭樨 
    ।  㤥 ⬥    #undef.
      #undef  :

          #undef 䨪

   ⠢ ९ "" ம।  ⨬
  䨪஬. ᫨ 㪠 䨪  
  ।    ந,   #undef
  .

  R.16.4 祭 䠩

  ࠢ ப :

          #include <䠩>

  ਢ    ப  ᮤন 䠩  㪠 .
   㪠 䠩 室  । ᫥⥫쭮
  ⥩ 娢 ⥬  । ॠ樥.
      筮, ࠢ ப :

          #include "䠩"

  ਢ    ப  ᮤন 䠩  㪠
  .  ⮣ 䠩 稭  ᮡ (⥬) 
  娢, 㪠  砫 ᫥⥫쭮 ᪠. ᫨ ⠬ 
   ,   䠩   ᥩ ᫥⥫쭮,  ᫨ 
  ࠢ ப  :

          #include <䠩>

       䠩, ࠭祭 ᨬ <  >  ᯮ짮
  ᨬ  ப  >. ᫨  ⠪    
  ᨬ ', \,  ",  ⠪ ᫥⥫쭮 ᨬ /*  //,
   १ ⠥ ।.
       䠩, ࠭祭 ன ᨬ "  ᯮ짮
  ᨬ  ப  ",  ᨬ > ⨬. ᫨  ⠪
    ᨬ '  \  ᫥⥫쭮 /*  //,
   १ ⠥ ।.
     ᫨ 

         #include ப-ᥬ

   , ᮮ⢥騩  ࢮ,  ன ࠢ饩 ப,
   ᥬ ९,   ⮩  ࠡ뢠 
   ⥪.  १   ,  ன
  ᮮ⢥   ਢ.   㤥 믮  .
     #include    䠩,  ᠬ  
  १ 믮 㣮  #include.
      뢠 ࠭祭  㡨 
   #include  室 䠩 ணࠬ,  室
    믮 ࢮ砫쭮  #include   
  室 䠩.

  R.16.5 ᫮ ࠭

    ९  ࣠ ᫮ ࠭
  ணࠬ. ⠪᪨   ᫥騬 ࠧ:

           ᫮:
                 -if -elif opt -else opt ப-endif

           -if:
                 ப-if ⥪

           ப-if:
                 # if ࠦ-⠭
                 # ifdef 䨪
                 # ifndef 䨪

           -elif:
                 ப-elif ⥪
                 -elif ப-elif ⥪

           ப-elif:
                 # elif ࠦ-⠭

           -else:
                 ப-else ⥪

           ப-else:
                 # else

           ப-endif:
                 # endif

      ⠭ ࠦ  #if  #elif (᫨   )
    浪    ⥪   ,  
      ⫨  .  ++, ᫥騥 
  ப,  ன ࠦ  ࠢ ,  ࠭᫨.
   ९, 騥  ⮩ ப .
  ᫥ ⮣,     㫥 祭 ࠦ,
  ⥪  ᫥ ⥩ #elif  #else (..  ++ 
   ९) . , ⭮騩  ࢮ
    㫥 祭 ࠦ  筮 ९୮
  ࠡ⪥  ࠭樨. ᫨ 祭  ࠦ, 㪠  #if
   #elif,  ࠢ묨 , ⮣ 筮 ࠡ⪥  ⥪,
  ⭮騩  #else.
       ࠦ-⠭, ஥ ⨫  #if  #elif
   ᯮ짮 㭠  defined, 祬  
  ਠ:

              defined 䨪

  

              defined (䨪)

  ᫨   ਬ  䨪,   ।
     #define,  ᫨  ।  뫮 ⬥
   #undef,  १ ࠢ 1,  १ ࠢ 0.
   䨪 defined  ८।,   ⬥
   ।.
      ᫥ ਬ 権 defined ந室 ⨥ 
   ம।,   ⠭⭮ ࠦ
  . $$R.16.3.  १   楫᫥
  ࠦ-⠭, ⫨饥  ।  $$R.5.19 ⥬,
   ⨯ int  unsigned int ᬠਢ  long  unsigned long
  ᮮ⢥⢥,  ஬ ⮣  ⮬ ࠦ   
  権 ਢ, sizeof   ᫥.
      ࠢ ப

         #ifdef 䨪

  ⭠ ப

         #if defined 䨪

   ࠢ ப

         #ifndef 䨪

  ⭠ ப

         #if !defined 䨪

     樨, 騥 ᫮ ࠭,   묨,
   ॠ  뢠 ࠭祭  㡨 
   権.

  R.16.6 ࠢ ப

   㤮⢠ ᠭ ணࠬ, ஦ ⥪  ++, 
  ࠢ ப :

         #line ⠭ "䠩" opt

    祭 ।। ந __LINE__ ($$R.16.10),
  ஥ ᯮ  ᪨ ᮮ饭  
  ᨬ᪮ ⫠;  :  ᫥饩 ப
  室 ⥪ ⠥ ࠢ  ⠭,  
    楫 ᫮. ᫨  "䠩",  祭
  ந __FILE__ ($$R.16.10) ⠭ ࠢ  㪠
  䠩. ᫨   , __FILE__   ᢮ 祭.
     ம।  ⮩ ࠢ饩 ப 뢠 
  믮 ᠬ .

  R.16.7  error

  ப :

         #error ப-ᥬ

  ⠢ ॠ 뤠 ᪮ ᮮ饭, 饥
    ᫥⥫쭮 ᥬ ९.

  R.16.8  pragma

  ப :

         #pragma ப-ᥬ

  ⠢ ॠ  ᥡ  । ࠧ
   ᫮  ॠ  ""  ப. 
  ᯮ ப #pragma .

  R.16.9  ४⨢

   ९ 

         #

   뢠  ⢨.

  R.16.10 ।। ந

    ࠭樨 । ଠ ᮤঠ ᫥騥
  ।। ந.

   __LINE__ 筠 ⠭, ᮤঠ  ⥪饩 ப
            ⥪ ணࠬ  ++.
   __FILE__ ப ࠫ, ।⠢  ࠭᫨㥬
            室 䠩.
   __DATE__ ப ࠫ, ।⠢  ࠭樨  
            "Mmm dd yyyy"  "Mmm d yyyy", ᫨ ᫮  10,
            ( Mmm  , dd - ,  yyyy - ).
   __TIME__ ப ࠫ, ।⠢ ६ ࠭樨  
            "hh:mm:ss", ( hh  , mm - , 
            ss - ᥪ㭤).

  ஬ ⮣, ⠥ ।  ࠭樨 ணࠬ  ++
  ந __cplusplus.
  ᫥ ந   ८।, ⠪  ⬥ 
  ।.
  ந __LINE__  __FILE__  ।   
  #line ($$R.16.6).
  ।  ந __STDC,  ᫨ ,    祭,
    ॠ樨.

  R.17 ਫ A:  ࠬ⨪

   ਫ  ⭮  ࠢ筮 㪮 몠 
    । 権 C++.
      ⮫쪮  㦨    ++. 
  ᬠਢ   筮 । 몠, ⠪  ᠭ 
  ࠬ⨪ ᪠ ந쭮 ⢮ 権,  
     ++. ⮡ ࠧ ࠦ  ᠭ,
  ᫥ ਬ ࠢ ࠧ襭 । ($$r.6.8,
  $$R.7.1, $$R.10.1.1). ,  ᥨ ᨭ⠪᪨ ࠢ,
   ᫥, 権 ᫥ ਬ ࠢ ஫
  㯠, ࠧ襭 ।  ஫ ⨯.

  R.17.1 㦥 ᫮

   ᠭ: typedef ($$R.7.1.3),  ($$R.9), ᫥
  ($$R.7.2),  蠡 ⨯ - ($$R.14)  , 騥 
  ⥪, 㦥 ᫮,  :

          -:
               䨪

          -᫥:
               䨪

          -typedef:
               䨪

  ⬥⨬,  -typedef, 饥 ,    
  ६ 樥 - ($$R.9.1).

  R.17.2 ࠦ

         ࠦ:
              ࠦ-ᢠ
              ࠦ, ࠦ-ᢠ

         ࠦ-ᢠ:
           ࠦ-᫮
           㭠୮-ࠦ -ᢠ ࠦ-ᢠ
           -ᢠ:  
                =  *=  /=  %=  +=  -=  >>=  <<=  &=  ^=  |=
         ࠦ-᫮:
               ᪮-ࠦ-
               ᪮-ࠦ- ? ࠦ : ࠦ-᫮

          ᪮-ࠦ-:
               ᪮-ࠦ-
               ᪮-ࠦ- || ᪮-ࠦ-

          ᪮-ࠦ-:
               ࠦ-
               ᪮-ࠦ- && ࠦ-

          ࠦ-:
               ࠦ-᪫饣-
               ࠦ- | ࠦ-᪫饣-

            ࠦ-᪫饣-:
                 ࠦ-
                 ࠦ-᪫饣- ^ ࠦ-

            ࠦ-:
                 ࠦ-ࠢ⢠
                 ࠦ- & ࠦ-ࠢ⢠

            ࠦ-ࠢ⢠:
                 ࠦ-⭮襭
                 ࠦ-ࠢ⢠ == ࠦ-⭮襭
                 ࠦ-ࠢ⢠ != ࠦ-⭮襭

            ࠦ-⭮襭:
                 ᤢ-ࠦ
                 ࠦ-⭮襭 <  ᤢ-ࠦ
                 ࠦ-⭮襭 >  ᤢ-ࠦ
                 ࠦ-⭮襭 <= ᤢ-ࠦ
                 ࠦ-⭮襭 >= ᤢ-ࠦ

             ᤢ-ࠦ:
                 ⨢-ࠦ
                 ᤢ-ࠦ << ⨢ ࠦ
                 ᤢ-ࠦ >> ⨢ ࠦ

             ⨢-ࠦ:
                 ⨯⨢-ࠦ
                 ⨢ ࠦ + ⨯⨢-ࠦ
                 ⨢-ࠦ - ⨯⨢-ࠦ

             ⨯⨢-ࠦ:
                 ࠦ-pm
                 ⨯⨢-ࠦ * ࠦ-pm
                 ⨯⨢-ࠦ / ࠦ-pm
                 ⨯⨢-ࠦ % ࠦ-pm

             ࠦ-pm:
                 ࠦ-ਢ
                 ࠦ-pm .*  ࠦ-ਢ
                 ࠦ-pm ->* ࠦ-ਢ

             ࠦ-ਢ:
                 㭠୮-ࠦ
                 ( -⨯ ) ࠦ-ਢ

             㭠୮-ࠦ:
                  䨪᭮-ࠦ
                  ++ 㭠୮ ࠦ
                  -- 㭠୮ ࠦ
                  㭠ୠ- ࠦ-ਢ
                  sizeof 㭠ୠ-
                  sizeof ( -⨯ )
                  ࠦ-ࠧ饭
                  ࠦ-᢮

            㭠ୠ-:  
                  *  &  +  -  !  ~

             ࠦ-ࠧ饭:
                 ::opt new ࠬ-new opt -⨯-new 樠-new
                 ::opt new ࠬ-new opt ( -⨯ ) 樠-new

            ࠬ-new:
                  ( ᯨ᮪-ࠦ )

            -⨯-new:
                 ᯨ᮪-ᯥ䨪権-⨯ ⥫-new opt

            ⥫-new:
                 * ᯨ᮪-ᯥ䨪権-cv opt ⥫-new opt
                 - :: ᯨ᮪-ᯥ䨪権-cv opt ⥫-new opt
                 ⥫-new opt [ ࠦ ]

            樠-new:
                  ( ᯨ᮪-樠஢ opt )

            ࠦ-᢮:
                  ::opt delete ࠦ-ਢ
                  ::opt delete [] ࠦ-ਢ

            䨪᭮-ࠦ:
                  ࢨ筮-ࠦ
                  䨪᭮-ࠦ [ ࠦ ]
                  䨪᭮-ࠦ ( ᯨ᮪-ࠦ opt )
                  -⮣-⨯     ( ᯨ᮪-ࠦ opt )
                  䨪᭮-ࠦ .  
                  䨪᭮-ࠦ -> 
                  䨪᭮-ࠦ ++
                  䨪᭮-ࠦ --

            ᯨ᮪-ࠦ:
                  ࠦ-ᢠ
                  ᯨ᮪-ࠦ , ࠦ-ᢠ

           ࢨ筮-ࠦ:
                  ࠫ
                  this
                  :: 䨪
                  :: -㭪樨-樨
                  :: 筥-
                  ( ࠦ )
                  

            :
                 䨪
                 -㭪樨-樨
                 -㭪樨-८ࠧ
                 ~-
                 筥-

            筥-:
                 饥-- :: 

            ࠫ:
                楫 ⠭
                ᨬ쭠 ⠭
                ⠭  饩 窮
                ப ࠫ

  R.17.3 ᠭ

         ᠭ:
                ᯥ䨪樨-ᠭ opt ᯨ᮪-⥫ opt ;
                ᠭ-asm
                ।-㭪樨
                ᯥ䨪-裡

          ᯥ䨪-ᠭ:
               ᯥ䨪--
               ᯥ䨪-⨯
               ᯥ䨪-fct
               ᯥ䨪-蠡-⨯
               friend
               typedef

          ᯥ䨪樨-ᠭ:
               ᯥ䨪樨-ᠭ opt ᯥ䨪-ᠭ

        ᯥ䨪--:
               auto
               register
               static
               extern

        ᯥ䨪-fct:
              inline
              virtual

       ᯥ䨪-⨯:
             -⮣-⨯
             ᯥ䨪-
             ᯥ䨪-᫥
             ᯥ䨪-᫮-⨯
             :: -
             const
             volatile

       -⮣-⨯:
             --
             筥--⨯
             char
             short
             int
             long
             signed
             unsigned
             float
             double
             void

       ᯥ䨪-᫮-⨯:
             㦥-᫮- -
             㦥-᫮- 䨪

       㦥-᫮-:
             class
             struct
             union

       筥--⨯:
             -typedef
             - :: 筥--⨯

       --:
             筥--
             :: 筥--

       筥--:
             -
             - :: 筥--

        -᫥:
             䨪

        ᯥ䨪-᫥:
            enum 䨪 opt { ᯨ᮪-᫥ }

        ᯨ᮪-᫥:
            -᫥
            ᯨ᮪-᫥ , -᫥

        -᫥:
            䨪
            䨪 = ࠦ-⠭

       ᯥ䨪-裡:
           extern ப-ࠫ { ᯨ᮪-ᠭ opt }
           extern ப-ࠫ ᠭ

       ᯨ᮪-ᠭ:
           ᠭ
           ᯨ᮪-ᠭ ᠭ

        ᠭ-asm:
            asm ( ப-ࠫ) ;

  R.17.4 ⥫

        ᯨ᮪-ᠭ:
             ⥫--樠஬
             ᯨ᮪-ᠭ , ⥫--樠஬

        ⥫--樠஬:
             ⥫ 樠 opt

        ⥫:
            --⥫
            -ptr ⥫
            ⥫ (ᯨ᮪-ᠭ-ࠬ஢) ᯨ᮪-ᯥ䨪権-cv opt
            ⥫ [ ࠦ-⠭ opt]
            ( ⥫ )

     -ptr:
           * ᯨ᮪-ᯥ䨪権-cv opt
           & ᯨ᮪-ᯥ䨪権-cv opt
           -- :: * ᯨ᮪-ᯥ䨪権-cv opt

     ᯨ᮪-ᯥ䨪権-cv:
           const
           volatile

     --⥫:
           
           -
           ~-
           -typedef
           筥--⨯

     -⨯:
          ᯨ᮪-ᯥ䨪権-⨯ ࠪ-⥫ opt

     ᯨ᮪-ᯥ䨪権-⨯:
          ᯥ䨪-⨯ ᯨ᮪-ᯥ䨪権-⨯

     ࠪ-⥫:
          -ptr ࠪ-⥫ opt
     ࠪ-⥫ opt ( ᯨ᮪-ᠭ-ࠬ஢ ) ᯨ᮪-ᯥ䨪権_cv opt
         ࠪ-⥫ opt [ ࠦ-⠭ opt ]
         ( ࠪ-⥫ )

     ᯨ᮪-ᠭ-ࠬ஢:
          ᯨ᮪-ᠭ-ࠬ opt ... opt
          ᯨ᮪-ᠭ-ࠬ , ...

     ᯨ᮪-ᠭ-ࠬ:
          ᠭ-ࠬ
          ᯨ᮪-ᠭ-ࠬ , ᠭ-ࠬ

     ᠭ-ࠬ:
          ᯥ䨪樨-ᠭ ⥫
          ᯥ䨪樨-ᠭ ⥫ = ࠦ
          ᯥ䨪樨-ᠭ ࠪ-⥫ opt
          ᯥ䨪樨-ᠭ ࠪ-⥫ opt = ࠦ

     ।-㭪樨:
          ᯥ䨪樨-ᠭ opt ⥫ 樠-ctor ⥫-㭪樨

     ⥫-㭪樨:
          ⠢-

     樠:
           = ࠦ-ᢠ
           = { ᯨ᮪-樠஢ , opt }
           ( ᯨ᮪-ࠦ )

     ᯨ᮪-樠஢:
           ࠦ-ᢠ
           ᯨ᮪-樠஢ , ࠦ-ᢠ
           { ᯨ᮪-樠஢ , opt }

  R.17.5 ᠭ 

      ᯥ䨪-:
           - { ᯨ᮪-童 opt }

      -:
           㦥-᫮- 䨪 opt ᯥ- opt
           㦥-᫮- - ᯥ- opt

      㦥-᫮-:
           class
           struct
           union

     ᯨ᮪-童:
           ᠭ-童 ᯨ᮪-童 opt
           ᯥ䨪-㯠 : ᯨ᮪-童 opt

     ᠭ-童:
           ᯥ䨪樨-ᠭ opt ᯨ᮪-⥫-童 opt ;
           ।-㭪樨 ; opt
           筥- ;

     ᯨ᮪-⥫-童:
           ⥫-童
           ᯨ᮪-⥫-童 , ⥫-童

     ⥫-童:
           ⥫ ᯥ䨪-⮩ opt
           䨪 opt : ࠦ-⠭

     ᯥ䨪-⮩:
           = 0

     ᯨ᮪-:
           ᯥ䨪-
           ᯨ᮪- , ᯥ䨪-

     ᯥ䨪-:
           --
           virtual ᯥ䨪-㯠 opt --
           ᯥ䨪-㯠 virtual opt --

     ᯥ䨪-㯠:
           private
           protected
           public

      -㭪樨-८ࠧ:
           operator -⨯-८ࠧ

      -⨯-८ࠧ:
            ᯨ᮪-ᯥ䨪権-⨯ -ptr opt

      樠-ctor:
           : ᯨ᮪-樠஢-童

      ᯨ᮪-樠஢-童:
           樠-童
           樠-童 , ᯨ᮪-樠஢-童

      樠-童:
           -- ( ᯨ᮪-ࠦ opt )
           䨪

       -㭪樨-:
           operator 

       :  
                 new delete
                 +   -   *   /   %   ^   &   |   ~
                 !   =   <   >   +=  -=  *=  /=  %=
                 ^=  &=  |=  <<  >>  >>= <<= ==  !=
                 <=  >=  &&  ||  ++  --  ,   ->* ->
                 ()  []

  R.17.6 

       :
           祭-
           -ࠦ
           ⠢-
           롨騩-
           -横
           -室
           -ᠭ

       祭-:
           䨪 : 
           case ࠦ-⠭ : 
           default : 

      -ࠦ:
           ࠦ opt ;

      ⠢-:
           { ᯨ᮪-஢ opt }

      ᯨ᮪-஢:
           
           ᯨ᮪-஢ 

      롨騩-:
           if ( ࠦ ) 
           if ( ࠦ )  else 
           switch ( ࠦ ) 

      -横:
            while ( ࠦ ) 
            do   while (ࠦ)
            for ( - ࠦ opt ; ࠦ opt ) 

      -:
            -ࠦ
            -ᠭ

       -室:
             break ;
             continue ;
             return ࠦ opt ;
             goto 䨪 ;

       -ᠭ:
             ᠭ

  R.17.7 ९

        #define 䨪 ப-ᥬ
        #define 䨪 ( 䨪 , ... , 䨪 ) ப-ᥬ

        #include "䠩"
        #include <䠩>

        #line ⠭ "䠩" opt
        #undef 䨪

        ᫮:
             -if -elif opt -else opt ப-endif

        -if:
             ப-if ⥪

        ப-if:
             # if ࠦ-⠭
             # ifdef 䨪
             # ifndef 䨪

         -elif:
              ப-elif ⥪
              -elif ப-elif ⥪

         ப-elif:
              # elif ࠦ-⠭

         -else:
              ப-else ⥪

         ப-else:
              # else

         ப-endif:
              # endif

  R.17.8  ⨯

          ᠭ-蠡-⨯:
               template < ᯨ᮪-ࠬ஢-蠡-⨯> ᠭ

          ᯨ᮪-ࠬ஢-蠡-⨯:
               ࠬ-蠡-⨯
               ᯨ᮪-ࠬ஢-蠡-⨯ , ࠬ-蠡-⨯

          ࠬ-蠡-⨯:
               ࠬ-⨯
               ᠭ-ࠬ

          ࠬ-⨯:
               class 䨪

           -蠡-:
               -蠡-⨯ < ᯨ᮪-ࠬ-蠡-⨯ >

           ᯨ᮪-ࠬ-蠡-⨯:
               ࠬ-蠡-⨯
               ᯨ᮪-ࠬ-蠡-⨯ , ࠬ-蠡-⨯

           ࠬ-蠡:
               ࠦ
               -⨯

  R.17.9 ࠡ⪠ ᮡ 権

           ஢塞-:
               try ⠢- ᯨ᮪-ࠡ稪

           ᯨ᮪-ࠡ稪:
               ࠡ稪 ᯨ᮪-ࠡ稪 opt

           ࠡ稪:
               catch ( ᠭ-ᮡ-樨 ) ⠢-

           ᠭ-ᮡ-樨:
               ᯨ᮪-ᯥ䨪権-⨯ ⥫
               ᯨ᮪-ᯥ䨪権-⨯ ࠪ-⥫
               ᯨ᮪-ᯥ䨪権-⨯
                   ...

          ࠦ-᪠:
              throw ࠦ opt

          ᯥ䨪-ᮡ-樨:
              throw ( ᯨ᮪-⨯ opt )

          ᯨ᮪-⨯:
              -⨯
              ᯨ᮪-⨯ , -⨯

  R.18 ਫ B: ⨬

   ਫ  ⭮  ࠢ筮 㪮 ++  
   । 権 몠.
      ++ ᭮뢠   (ᠭ   ୨  ,
  78 .,  K&R)  砥 設⢮ , ।
   ANSI ⠭  .  ஢ ணࠬ  몠
  ++, K&R C  ANSI C   㤭  裡  ࠧ
  ᫥   ࠦ. ࠭  ᯮ  ࠧ
   ++  ANSI C. ணࠬ  ++  ANSI C   
    ᪫祭  ᫥ 砥:
      몥  ࠦ sizeof('a') ࠢ sizeof(int),   ++
   ࠢ sizeof(char).
     ᫨   ᠭ

         enum e { A };

   sizeof(A) ࠢ   sizeof(int), ⮣   ++  ࠢ sizeof(e)
    易  ࠢ sizeof(int).
      , ᠭ  ७ ,  뢠 
  ꥪ, 㭪樨,  ᫥  ⨯  譥 .
  ਢ ਬ:

         int x[99];
         void f()
         {
           struct x { int a; };
           sizeof(x);  /*  C  ࠧ ᨢ   */
                       /*   C++ ࠧ  */
          }

  R.18.1 ७

   ⮬ ࠧ  ᭮ ७ 몠 , 
   ++.

  R.18.1.1  ++,   1985 .

    ,   , ᨥ 몠
  ++ 1985 .
      㪠뢠 ⨯ ଠ ࠬ஢ 㭪樨 ($$R.8.2.5),  
   ஢ ($$R.5.2.2). 㤥 ந室 ८ࠧ
  ⨯ ($$R.5.2.2).     ANSI C.
      ࠦ  祭ﬨ ⨯ float ᫥  室
   筮 筮 ($$R.3.6.1  $$R.4.3).     ANSI C.
      ॣ㦠  㭪権; $$R.13.
      ॣ㦠 樨; $$R.13.4
      ॠ 맮 㭪権 ⠭; $$R.7.1.2.
      뢠 ꥪ, ।⠢騥 ,  ᯥ䨪樥
     const; $$R.7.1.6.     ANSI C.
      뢠 ⨯ 뫪; $$R.8.2.2  $$R.8.4.3.
      ࠢ ᢮    権 new 
     delete; $$R.5.3.3  $$R.5.3.4.
      ,  : 뢠 ଠ ($$R.11),
     ஢ 樠 ($$R.12.1), ⢫ 짮⥫᪨
     ८ࠧ ⨯ ($$R.12.3)  ࠡ  ᪨ ⨯
       㠫 㭪権 ($$R.10.2).
        ᫥ ⠥  ⨯; $$R.9.
     ⥫   ꥪ c ⨯,  騬 const  volatile,
      ᢮ 㪠⥫ ⨯ void*.     ANSI C.
     ⥫  㭪  ᢠ 㪠⥫ ⨯ void*;
     $$R.4.6.
     ᠭ   ⠥ ஬; $$R.6.7.
      뢠 ﭭ ꥤ; $$R.9.5.

  R.18.1.2 ,   ++ ᫥ 1985 .

    ᭮ ७ ++ ᫥ 1985 .:
          אַ  
  (⢥ ᫥); $$R.10.1.
         饭묨; $$R.11.
     樨 new  delete  뢠    ॣ㦠;
     $$r.5.3.3, $$R.5.3.4, $$R.12.5.   । ᯮᮡ
  ࠢ      "ᢠ 㪠⥫
  this" ⭥  ࠧ ஭; $$R.18.3.3.
       㭨⮦ ꥪ; $$R.12.4.
     ᢠ  樠   ।  ᢠ 
  樠  童; $$R.12.8.
     㦥 ᫮ overload ⠫ 譨  ⭥ᥭ  ࠧ
  ஭; $$R.18.3.
     ந ࠦ ࠧ襭  ⢥ 樠஢ ᪨
  ꥪ⮢; $$R.8.4.
     ꥪ, ।⠢騥 ,   volatile; $$R.7.1.6.
     ANSI C.
     ⨬ 樠  ᪨ 童 ; $$R.9.4.
     㭪樨-童   ᪨; $$R.9.4.
     㭪樨-童   const  volatile; $$R.9.3.1.
       㪠 뢠  ணࠬ  㣨 몠;
  $$R.7.4.
      ॣ㦠 樨 ->, ->*  ` ; $$R.13.4.
        ࠪ묨; $$R.10.3.
      짮⥫᪨ ⨯ 䨪  䨪 樨
  ࠧ.
      ⨯; $$R.14.
     ࠢ ᮡ묨 ﬨ; $$R.15.

  R.18.2 ++  ANSI C

    ++  訬 ﬨ   
  ࠭祭, 祬 ANSI C, ⮬ 設⢮ 権 ANSI C
   묨  ++, 祬    . ᪫祭
  ᢮  ᫥饬:
      ணࠬ  ANSI C, ᯮ  ⢥ 䨪஢
  ᫥騥 㦥 ᫮ ++,   ணࠬ  ++; $$R.2.4:

         asm       catch      class       delete     friend
         inline    new        operator    private    protected
         public    template   try         this       virtual
         throw

       ⠥ ॢ襬  ANSI C, ॠ   
   ࠪ᪨ ࠭祭   䨪஢;  ॠ ++
    ⨬; $$R.2.3.
      ++ 㭪   ᠭ ०, 祬   맢;
   $$R.5.2.2.
     ᠭ f();  ++ 砥,  㭪 f   ࠬ஢
   ($$R.8.2.5),     砥,  f    ᫮
   ࠬ஢  ⨯.  ᠭ ⠥ ॢ訬  ANSI C.
      ANSI C  ᪮쪮 ࠧ   ᯥ䨪樨 extern 
   ꥪ ,  ++  ⮫쪮   ।; $$R.3.3
      ++     ⮦ ,    typedef, ⭮饥
    ⮩     㣮 ⨯; $$R.9.1.
      ANSI C ࠭ ⨯ void*  ᯮ짮  ࠢ 
   ᢠ,  ⠪  樠樨 ६ ⨯ 㪠⥫ 
   ந ⨯;  ++   $$R.7.1.6.
      ANSI C   室, 室騥 樠;
    ++  .
      ANSI C  㬮砭  ꥪ ⨯ const 
   譥 뢠;  ++   ⠪; $$R.3.3.
     । 㭪権  "஬" ⨫  맮 ᠭ 㭪権
     ++ ஭,   易⥫쭮 
   ন  ॠ樥; $$R.18.3.1.  ANSI C  
    ॢ訬.
      ++  (struct) ࠧ   ($$R.3.2);
    ANSI C , ᫥   ᫥,
   ᠭ       ᠬ
   .
     ᢠ ꥪ ⨯ ᫥ 祭,  ਭ饣
   ᫥, ⠥  ++ ஭    ন
     ॠ; $$R.7.2.  ANSI C ४  ⠪
   ᢠ 뤠 ।०.
     ப, 樠騥 ᨬ ᨢ,    
    ᨢ; $$R.8.4.2.
      ᨬ쭮 ⠭  ++  char ($$R.2.5.2)  int 
   ANSI C.
       ᫥  ⨯ ⮣ ᫥  ++ ($$R.7.2)
    ⨯ int  ANSI C.
     ஬ ⮣, ⠭ ANSI   ᪠ ⥫ ࠧ 
  ⨬ ॠ 몠,   ਢ   訬 宦
   ॠﬨ ++  .  ⭮,   ॠ 
    ⨬  ᮢ⨬ ᠭ.  ++ ॡ
  ᮢ⨬   ࠧ  ࠭樨; $$R.3.3.

  R.18.2.1    宦ﬨ

   饬 砥 ணࠬ  ++ ᯮ  ,
  騥  ANSI C.  ⠪ ணࠬ ⥫ 宦,
  ᫥  $$R.18.2,  ४뢠 ७ﬨ  ++. 
  ++  ANSI C   騥  䠩, 㦭 ,
  ⮡  䠩 ।⠢﫨 ⥪  饬 ⢥  몮.
      짮 ᯥ᪨ ﬨ ++ ⠪, 
  , ॣ㧪  ..
      ᯮ짮    祭 ⨯   㣮
  ⨯.
     㭪  ࠬ஢ ᫥ 뢠  f(void),    f().
      ꥪ ⨯ const ᫥  ᯥ஢  static
   extern.
      ࠧ ⥩ ணࠬ  ANSI C  ++  ᯮ짮
  ᫮ ࠭  ।ᠭ  __cplusplus.
     㭪樨,   뢠  ணࠬ   몠, 
    ᠭ,  㭪樨, 騥 뢠  .

  R.18.3 ஭

   ++   ᫥  ७, ⮡
   ᯮ짮 ணࠬ  ,  ⮡  室
    ࠭ ᨩ ++. ⬥⨬,    ७ 易
  ⥫ ᫥⢨. ᫨ ॠ ।⠢ ⠪ ७,
     ⠪ ।⠢  㡥  ⢨
   ᫥⢨  室 ணࠬ.  ++  易
  ᯥ稢  ७.
      ᠭ  । 㭪樨  ᯮ짮 ᫮ overload
  樨 ᯥ䨪-ᠭ ($$R.7). ᫨  ᯮ 
  ᯥ䨪樨-ᠭ,  ⠥ 㦥 ᫮   
  ᯮ짮  䨪.
     । ᪮ 童 , ।⠢饣 ,
   ண  ⠭⭠ 樠 ﬨ ($$R.8.4, $$R.9.4),
    饭.
      ᯮ짮  ९ ண ⨫ ( ANSI C).
      ᢠ ꥪ ⨯ ᫥ 祭 ⨯ int.
      㤠 ᨢ, ⨯ ண   , 
  㪠뢠 ᫮ ⮢; $$R.5.3.4.
      㭪 operator++()  ᯮ짮  ॣ㧪 
  䨪, ⠪  䨪 権 ++; ⮦ ୮  樨 --;
  $$R.13.4.6.

  R.18.3.1 । 㭪権 ண ⨫

   ᯮ짮 ᨭ⠪   । 㭪権:

       ஥-।-㭪樨:
            ᯥ䨪樨-ᠭ opt -⥫-㭪樨
            ᯨ᮪-ᠭ opt ⥫-㭪樨

       -⥫-㭪樨:
            ⥫ ( ᯨ᮪-ࠬ஢ opt )

       ᯨ᮪-ࠬ஢:
            䨪
            ᯨ᮪-ࠬ஢ , 䨪

   ਢ ਬ:

   max(a,b) int b;  { return (a<b) ? b : a; }

   ᫨ । ⠪ ࠧ 㭪  뫠 ᠭ ࠭,  ⨯
    ଠ ࠬ஢  (...), ..   㤥 ஢.
   ᫨  뫠 ᠭ,  ⨯  ᮣᮢ뢠  ⨯,
   㪠  ᠭ.
   ਢ ᨭ⠪  ᯮ짮  । 㭪権-童.

   R.18.3.2  ⨫  樠  

    樨 樠- ($$R.12.6.2)   㪠뢠
  -, 饥    ᫮,  
  ⮫쪮  אַ (।⢥)  . ⮬ 
  ᠭ

         class B {
            // ...
         public:
            B(int);
         };

         class D : public B {
            // ...
            D(int i) : (i) { /* ... */ }
         };

   㤥 뢠  B  ࠬ஬ i.

   R.18.3.3 ᢠ 㪠⥫ this

   ᢠ । 祭 㪠⥫ this, 짮⥫ 
   ࠢ 뤥   ꥪ ண . 
     ᯮ짮 童   뫮  
   ⠪ ᢠ ॠ ᢮  뤥 .
   ᢠ   㪠⥫ this ,  뫮
    ⠭  ᢮ ꥪ⮢ . ஬
   ⮣, ᢠ    ⬥﫮  맮
   ஢  童   ᮢ, ਬ:

          class Z {
            int z[10];
            Z()  { this = my_allocator(sizeof(Z) ); }
            ~Z() { my_deallocator (this); this = 0; }
          };

     ᫨ 뤥  㦥 ந諮 ( 뢠  童 
  ꥪ⮢ auto  static),   室   this 
  㫥 祭  祭   ⨢ 砥.
     맮 ஢  童   ᮢ ந
  ⮫쪮 ᫥ ⮣,  this 稫 祭. ᫨  
     ᢠ this,   祭 this
  㤥 ᯮ짮    ந ᮢ, ᫨
   .
     ⬥⨬,   稨 㪠 ஭  ⨯ 㪠⥫
  this    *const,  㦭  ᪫祭  this 
  ࠢ  ᢠ 㪠⥫  ᯥ䨪樥 const.

  R.18.3.4 ਢ 㪠⥫  㭪-童

  ⥫  㭪-童 ண ꥪ  ਢ 
  㪠⥫  -  㭪, ਬ (int (*) ())p->f.
  騩 㪠⥫ 㤥 ஥  㭪, 맮 ன
  㤥 ந室   饭  ⮩ 㭪樨-童 
  ⮣  ꥪ.  筮 १ ⠪ 맮 ⠥
  ।.

  R.18.3.5  ᮢ


  ᫨  ᠭ  㣮    ணࠬ  
  ᠭ ᮢ  ⨬ ,    ᯮ짮, 
  ᫨    ᠭ   (⠪ ⮨   ᠭ
  struct  ), ਬ:

          struct S {
              struct T {
                int a;
              };
              int b;
          };

          struct T x;   // 砥 `S::T x;'

