沉默流星 发表于 7 小时前

这个类型如何解决

问题如下:
在封装时碰到这个数据类型,代码如下
virtual ITexture* getTexture(const io::path& filename) = 0;

typedef core::string<fschar_t> path;

template <typename T, typename TAlloc = irrAllocator<T> >
class string
{
public:

        typedef T char_type;

        //! Default constructor
        string()
        : array(0), allocated(1), used(1)
        {
                array = allocator.allocate(1); // new T;
                array = 0;
        }


        //! Constructor
        string(const string<T,TAlloc>& other)
        : array(0), allocated(0), used(0)
        {
                *this = other;
        }
调用代码如下:
node->setMaterialTexture(0, driver->getTexture("H:\\CAD开发安装包\\游戏相关\\day013d\\irrlicht3Dday01\\irrlicht3Dday01\\media\\sydney.bmp"));在火山中试过以下几种
1.@pvpt<参数名称> 组合@sn<quot>
2.嵌入式方法
req_obj_param_pointer:
req_str_param_text_pointer
3.GetText()
4.@an<CVolString>
5. CU8String五种方法都试过,都是中文路径访问不了,必须是英文的,在VS当中中文路径是正常的,应该如何解决
也试过下面这个,但封装失败,封装代码如下
<火山程序 类型 = "通常" 版本 = 1 />

类 鬼火环境类 <公开 @别名 = "irr::io::path" @别名类型 = 本地类>
{
    方法 创建 <公开 静态 类型 = 标准文本类 注释 = "基于所指定文本内容创建对应的utf-8编码标准文本数据" @嵌入式方法 = "">
    参数 文本数据 <类型 = 文本型>
    {
      @ irr::io::path ((const char *)CU8String (@<文本数据>).GetText ())
    }

    #
}


hcwanz 发表于 7 小时前

vs正常, 火山不正常, 可能不是代码的问题了, 在vs里运行时看一下代码页? 和火山的一样吗?
页: [1]
查看完整版本: 这个类型如何解决