在Linux C++中使用别人提供的SDK获取到std::futurestd::shared_ptr<std::iostream>这种类型的音频数据,该怎么把这种类型的数据保存到音频文件中?
在使用下面的code进行保存的时候,编译的时候提示:
std::ofstream out("result.mp3");
if (out.is_open())
{
out.write(str1,strlen(str1));; //str1是std::future<std::shared_ptr<std::iostream>> 类型数据
out.close();
}
cannot convert ‘std::future<std::shared_ptr<std::basic_iostream<char> > >’ to ‘const char*’ for argument ‘1’ to ‘size_t strlen(const char*)’
或者是需要把std::futurestd::shared_ptr<std::iostream>类型进行转换一下,该怎么转换?