C++/CLI vs C++: handler, pointer, etc.

Napisano na 12/18/2007 - 14:20, napisao dIONEO

Handler? nikad culi? nove tehnike iliti ga C++/CLI..
pa to bi bilo nesto nalik pointeru, ali samo nalik..

// Test.cpp : main project file.
 
#include "stdafx.h"
 
using namespace System;
 
//ref class My
value class My
{
public:
	Double Value;
};
 
void M_change1(My^ _My)
{
	_My->Value=100.;
}
void M_change2(My^% _My)
{
	_My->Value=200.;
}
void M_change3(My _My)
{
	_My.Value=200.;
}
 
int main(array<System::String ^> ^args)
{
	My _a;
	My^ _b=gcnew My;
 
	_a.Value=0.;
	_b->Value=0.;
 
	Console::WriteLine("A="+_a.Value.ToString());
	Console::WriteLine("B="+_b->Value.ToString());
 
	M_change1(%_a);
	M_change1(_b);
 
	Console::WriteLine("A="+_a.Value.ToString());
	Console::WriteLine("B="+_b->Value.ToString());
 
	M_change2(%_a);
	M_change2(_b);
 
	Console::WriteLine("A="+_a.Value.ToString());
	Console::WriteLine("B="+_b->Value.ToString());
 
	M_change3(_a);
	M_change3(*_b);
 
	Console::WriteLine("A="+_a.Value.ToString());
	Console::WriteLine("B="+_b->Value.ToString());
 
    return 0;
}

promjenom value class My u ref class My kod ima sasvim drukcije znacenje. igrajte se.. ;)

So long..

Visual Studio 2010 Beta 1

Visual Studio 2010 Beta 1 introduces a number of exciting new features for the C++ developer as we include a selection of goodies from the upcoming C++0x Standard. We have already heard seo about many of the language improvements (auto, decltype, lambdas, rvalue references, …) all of which can be put to good use when using the Standard Template Library (STL). Here, Visual C++ team members who work on the STL – Stephan (Dev), Damien (PM) and a cameo appearance by Usman (QA) – Usman works in our Canadian Development Center and unfortunately could not be onsite for the work at home video - tell us all about the latest version of STL. We talk about how the language features are enabling many improvements to the STL, with performance being a big beneficiary. To realize these benefits we needed to update our STL implementation to leverage these new techniques, for example adding “move” semantics to STL containers. Additionally when users of our STL implementation add “move” semantics to their types that they store in our STL web hosting containers then we hook into these as well.

Shery avatar
Posted by Shery on Sub, 07/18/2009 - 11:22
Women in summer would like to

Women in summer would like to become beautiful. Everything can grab other's eyes is their best friends.Products make them beauty and confident is their favourite. Look in the street,you can see many different types of make up to show women's personality.

Welcome to the shop, the following is our products, free shipping.

Soccer Shoes Cheap Soccer Shoes Nike Soccer Shoes Adidas Soccer Shoes Nike Soccer Shoes sale Adidas Soccer Shoes sale UGG UGGs UGG Boot UGG Boots UGG Boots Sale Cheap UGG Boots UGG Boots Cheap Women UGG boots ugg boots cardy ugg cardy boots Nike Air Nike Air Max Nike Air Max Shoes Nike SB Nike Dunk Nike Dunk SB Nike Dunk SB Shoes Nike Shox Nike Shox Shoes Timberland Timberland sale Timberland boots Timberland boots online Timberland on sale New timberland boots Women Bags Women Bags Sale Women Handbags Women Handbags Sale Women New Bags Cheap Bags Cheap Bags On Sale UGG UGG boots UGG boots sale UGG boots short Short ugg Short ugg boots Ugg boots tall New women bags New women bags sale New women bags sale online Louis Vuitton Handbags Gucci bags Nike Nike Shoes Nike Shoes Sale Nike running Nike running shoes Nike trainers Nike trainers shoes Timberland Timberland boots Timberland boots sale Timberland boot Timberland boot sale Timberland boots cheap Men timberlands MBT MBT Shoes MBT Chapa GTX MBT Men Shoes MBT Women Shoes Discount MBT Shoes LV Handbags Gucci Handbags Chanel Handbags Chloe Handbags D&G Handbags Dior Handbags Fendi Handbags Hermes Handbags Jimmy Choo Bags Marc Jacobs Bags Miu Miu Handbags Mulberry Bags Prada Handbags Versace Handbags Yves Saint Laurent Balenciaga Bags Burberry Handbags LV Handbags Gucci Handbags Chanel Handbags Chloe Handbags D&G Handbags Dior Handbags Fendi Handbags Hermes Handbags Jimmy Choo Bags Marc Jacobs Bags Miu Miu Handbags Mulberry Bags Prada Handbags Versace Handbags Yves Saint Laurent Balenciaga Bags Burberry Handbags

Those who want to become most beautiful in the world should try them. Just ones can make you different. Girls who want to grab your boyfriends's heart is necessary to use them.

quentina avatar
Posted by quentina on Thu, 08/19/2010 - 09:19