0
点赞
收藏
分享

微信扫一扫

C++获取路径中的文件名

凛冬已至夏日未远 2022-06-13 阅读 72
string path1="D:\osge\data\world.shp";  
int pos1=path1.find_last_of('\\');
string s1(path1.substr(pos1+1));
cout<<s1<<endl;


举报

相关推荐

0 条评论