gpt4 book ai didi

c++ - cinder函数过载错误

转载 作者:行者123 更新时间:2023-11-30 04:23:58 24 4
gpt4 key购买 nike

在这个简单的 cinder 示例中(来自 cinder 介绍 - http://libcinder.org/docs/v0.8.4/hello_cinder.html)我得到了这个编译错误:

myImage = gl::Texture( loadImage( loadResource( "image.jpg" ) ) );

错误 1 ​​错误 C2661:“cinder::app::App::loadResource”:没有重载函数需要 1 个参数

但是文档说:

DataSourceRef cinder::app::loadResource (   const std::string &     macPath  )

有什么想法吗?

最佳答案

你指的是同一个函数吗:

cinder::app::App::loadResoure
cinder::app::loadResource

从未使用过这个库,但文档说第一个函数需要更多参数:

http://libcinder.org/docs/v0.8.4/classcinder_1_1app_1_1_app.html#afef905bb792960152d38c2680f88ea33

static DataSourceRef cinder::app::App::loadResource (   
const std::string & macPath,
int mswID,
const std::string & mswType
)

关于c++ - cinder函数过载错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13057699/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com