码迷,mamicode.com
首页 > 移动开发 > 详细

c++移动文件夹

时间:2015-05-12 11:06:42      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:

bool Files::MoveSampleFolder(string src_path,string dst_path)
{
    int index = src_path.find_last_of("\\");
    string tem_path = src_path.substr(index);

    dst_path = dst_path + tem_path;

    rename(src_path.c_str(),dst_path.c_str());
    return true;

}

src_path 待移动文件夹

dst_path存放路径

Files是自己定义的一个类,可无视

c++移动文件夹

标签:

原文地址:http://www.cnblogs.com/Daringoo/p/4496599.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!