XML Question

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
guest1

Post by guest1 »

c8 *longtext;
longtext = new c8[2048]; // I think this is correct syntax(?)

wcstombs(longtext, xml->getAttributeValue(L"attr"), 2048);

if you don't want to use "new", you can of course either do it the way I did it in my Ship.cpp file or you can just provide a pointer... No need though... check out the Ship.cpp file for reference. If it has to be a irr::string or std::string -- those shouldn't be very hard with the above method. Just remember to delete longtext after you convert your string over.
Guest

Post by Guest »

Cheers again m8, I don't know why the XML is giving me so much grief. A lot of the problems I was having at first I blamed on the engine when it seems to be my dumb self :oops:

Ahh well, it works anyway :)
Post Reply