【问题标题】:How to convert between C++Builder UnicodeString and boost string?如何在 C++Builder UnicodeString 和 boost 字符串之间进行转换?
【发布时间】:2010-12-15 10:38:19
【问题描述】:

我有一个在文件系统的一部分中搜索文件的应用程序。用户应该在编辑框中输入文件的名称,这样我将其值分配给UnicodeString 变量。如何转换然后发给boost::filesystem::path

【问题讨论】:

标签: boost c++builder edit unicode-string


【解决方案1】:

使用UnicodeStringw_str() 方法检索wchar_t *

UnicodeString foo = Edit1->Text;

boost::filesystem::path p(foo.w_str());

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-08-25
    • 1970-01-01
    • 1970-01-01
    • 2017-08-05
    • 1970-01-01
    • 2017-09-06
    • 2013-04-20
    • 1970-01-01
    相关资源
    最近更新 更多