COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 08-21-2015, 11:52 AM   #1
mviljamaa
Human being with feelings
 
Join Date: Jun 2015
Posts: 348
Default std::string in WDL-OL?

How to use std::string in WDL-OL?

It seems like there's some overlapping typedef in WDL-OL since using std::string says that string is not a member of std.

Specifically, I need the c_str method in order to go from string to c_str for some function arguments.
mviljamaa is offline   Reply With Quote
Old 08-21-2015, 02:03 PM   #2
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 356
Default

I am using std::string without any issues. Are you adding #include <string> within the header?

Also, you can look at the WDL_String class. It handles most of the same functions as std::string.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 08-21-2015, 04:47 PM   #3
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

It's usually best to use the string class of the framework that you are working with, even if the class sucks. If some API of some other library needs something else, do the conversion at the last possible place.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:39 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.