[ create a new paste ] login | about

Link: http://codepad.org/iNWUsxiu    [ raw code | fork ]

C++, pasted on Nov 10:
// =============================================================
// ================ 構造体の考え方一例:簡潔版 =================
// =============================================================

int main()
{

   int                     x;
   //^^^^^^^^^^^^^^^^^^^   ^
   struct{int a; int b;}   y;
   //^^^^^^^^^^^^^^^^^^^   ^

   struct{int a; int b;}   z;
   struct{int a; int b;}   q;
   struct{int a; int b;}   r;


      /* ↑ウザいのでタグ↓ */


   struct tag {int a; int b;} s;
   tag                        t;
   tag                        u;
   //^^^^^^^^^^^^^^^^^^^^^^^^ ^


      /* ↑typedefして型化↓ */


   typedef struct {int a; int b;}  kata;
   // <-------------------------> → ^^^^
   //             ↓

     kata  v;
     kata  w;
     int   o;
   //^^^^  ^

 return 0;
}


Output:
No errors or program output.


Create a new paste based on this one


Comments: