Assign new value to dereferenced int : gcnew « Language Basics « Visual C++ .NET






Assign new value to dereferenced int

 
#include "stdafx.h"
using namespace System;

void main()
{

    int ^y = gcnew int(100);  

    *y = 110;                 
    Console::WriteLine(*y);   
}

   
  








Related examples in the same category

1.Create a handle to an int
2.Using gcnew
3.generic gcnew