If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
thomas1234
Posts: 14 Joined: Mon Jan 19, 2009 12:36 pm
Location: Hong Kong
Post
by thomas1234 » Sun Apr 05, 2009 4:49 pm
Hi, does anyone know how to convert the .NET string to stringw?
Code: Select all
String^ net_s = "Hello .NET"; //.Net string
stringw s=(stringw)net_s;
It gives me an error as following:
1>.\main.cpp(221) : error C2440: 'type cast' : cannot convert from 'System::String ^' to 'irr::core::stringw'
1> Conversion requires a constructor or user-defined-conversion operator, which can't be used by const_cast or reinterpret_cast
Thanks.
thomas1234
Posts: 14 Joined: Mon Jan 19, 2009 12:36 pm
Location: Hong Kong
Post
by thomas1234 » Mon Apr 06, 2009 3:33 pm
Anybody can give a hand? Thanks
cdrwolfe
Posts: 100 Joined: Thu Nov 15, 2007 5:38 pm
Location: Cranfield University
Post
by cdrwolfe » Wed Apr 08, 2009 8:35 pm
Out of curiosity are you using the .NET version of Irrlicht?
Regards Wolfe
thomas1234
Posts: 14 Joined: Mon Jan 19, 2009 12:36 pm
Location: Hong Kong
Post
by thomas1234 » Sat Apr 11, 2009 7:13 am
cdrwolfe wrote: Out of curiosity are you using the .NET version of Irrlicht?
Regards Wolfe
Yes. I use it in my unmanged c++ program. But I need to pass something to the managed dll which is written in c#. So need to make this conversion.