Visual C++ .NET/Statement/macro — различия между версиями

Материал из .Net Framework эксперт
Перейти к: навигация, поиск
м (1 версия)
 
м (1 версия)
 
(нет различий)

Текущая версия на 15:06, 26 мая 2010

Defined macro

<source lang="csharp">

  1. include "stdafx.h"

using namespace System;

  1. define DISAPPEARS
  2. define ONE 1
  3. define TWO 2
  4. define POW2(x) (x)*(x)

void main() {

   Console::Write("The follow symbol disappears->" DISAPPEARS);
   Console::WriteLine("<-");
   Int32 x = TWO;
   Int32 y = POW2(x + ONE);
   Console::WriteLine(y);

}

 </source>