Converting strings..

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.
Post Reply
dwfait
Posts: 28
Joined: Sun Sep 24, 2006 8:13 pm

Converting strings..

Post by dwfait »

Am I missing something or is there a way to convert strings between say stringc/w and c8?

Also is there a way to directly assign a string to a c8? like so:
c8 string1;
string1="gkldhkgj";
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

for converting search the forum, please !!!

You can define a string like this:

Code: Select all

string<c8> myString;
look the api for more information...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Please note that c8 means character, so it is only one letter. You cannot assign a complete string to it. And if you use c8* pointers you have to care for memory handling on your own (as always with pointers). So better stay with strings and use stringvar.c_str() to get the C char pointer for routines which only take character pointers.
Post Reply