Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Can i use the STL with DarkGDK

Author
Message
Cuddle Bunniezzz 12
15
Years of Service
User Offline
Joined: 14th Jan 2009
Location: Buffalo, NY
Posted: 31st Jul 2009 21:00
Things from the standard template library like <vector>, <algorithm>, <string>, <ctime>, etc.

http://twewy-fan.com/ <-- The first ever fansite for "The World Ends With You"
Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 31st Jul 2009 21:12
Yes, you can, but in many cases this causes linker errors, so go to:

Project->!Project_Name! Properties...->[+]Configuration Properties->[+]C/C++->Code Generation

Change the Runtime Library to /MT instead of /MTd

Click OK.

Your_Health = (My_Mood == HAPPY) ? 100 : NULL;
Cuddle Bunniezzz 12
15
Years of Service
User Offline
Joined: 14th Jan 2009
Location: Buffalo, NY
Posted: 1st Aug 2009 02:29
Can I use all of them, or just a few.

http://twewy-fan.com/ <-- The first ever fansite for "The World Ends With You"
Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 1st Aug 2009 02:50
I don't see why you wouldn't be able to use all of them. Just use the method above to avoid the linker errors.

Your_Health = (My_Mood == HAPPY) ? 100 : NULL;
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 1st Aug 2009 19:25
Exept i don't think string will work with any DGDK functions.

you can have them it just won't exept them as a parameter in the functions.

New Site! Check it out \/
Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 1st Aug 2009 19:53
Right, because you just have to pass in a char array like this:



The member c_str() of string returns a const pointer to the char* equivalent of the string object.

Your_Health = (My_Mood == HAPPY) ? 100 : NULL;
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 1st Aug 2009 20:06 Edited at: 1st Aug 2009 20:06
Sure you can, you just need to convert them to a null-terminated string first like this :



Its a little more involved, turning an std:String into a null-terminated string, but not really once you are used to it.

Hope this helps

EDIT : That'll learn me for bein a slow typer lol

If it ain't broke.... DONT FIX IT !!!
MFC Coder
15
Years of Service
User Offline
Joined: 5th Mar 2009
Location:
Posted: 2nd Aug 2009 23:29
How about...

Login to post a reply

Server time is: 2024-10-01 08:51:06
Your offset time is: 2024-10-01 08:51:06