struct with copy constructor : Constructor « Structure « Visual C++ .NET






struct with copy constructor

 

#include "stdafx.h"

using namespace System;

ref struct R
{
   R()
   {
      val = 1;
   }

 
   R( R% r)
   {
      val = r.val;
   }

   property int val;
};



int main()
{
    R r;
}

   
  








Related examples in the same category