NETFAN,
If you want the object to be created on the stack, then you have to
remove the gcnew keyword. If you want to hold a reference to an object,
then you have to declare a reference, which I believe you do like so:
// Create a new instance of Myclass and get the reference.
Myclass^ Obj = gcnew Myclass();
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Mas L via DotNetMonster.com" <fo***@nospam.DotNetMonster.com> wrote in
message news:4F***********@DotNetMonster.com...
Hi,
I have a C-sharp DLL(C#2005) and I use it as a reference in a VSC++(2005)
project.
When I
Myclass Obj = gcnew Myclass();
he says that I need a copy constructor!!??!!! Is there a way to avoid
this?
Kind Regards
NETFAN
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...sharp/200506/1