Create a handle to an int : gcnew « Language Basics « Visual C++ .NET






Create a handle to an int

 
#include "stdafx.h"
using namespace System;

void main()
{

    int ^y = gcnew int(100);  // create a handle to an int
    Console::WriteLine(y);    // print out int.
}

   
  








Related examples in the same category

1.Assign new value to dereferenced int
2.Using gcnew
3.generic gcnew