该错误是需要将C++字符串转换为C字符串。

使用stat(path.c_str())等string::c_str()方法将C++字符串转换为C字符串。

有关详细信息,请参阅http://cplusplus.com/reference/string/string/c_str/。

参考链接:

  1. https://cloud.tencent.com/developer/ask/sof/706360/answer/1039787

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐