_splitpath, _wsplitpath 分割路径
2016-07-26 08:45
477 查看
[cpp] view
plaincopy
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
char *path="c:/renjingwei/ren/jing/wei/wo/张信哲--白月光.mp3";
char drive[5];
char dir[100];
char filename[100];
char fileext[10];
_splitpath(path,drive,dir,filename,fileext);
cout<<"filepath: "<<path<<endl
<<"drive: "<<drive<<endl
<<"dir: "<<dir<<endl
<<"filename: "<<filename<<endl
<<"fileext: "<<fileext<<endl;
system("pause");
return 0;
}
plaincopy
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
char *path="c:/renjingwei/ren/jing/wei/wo/张信哲--白月光.mp3";
char drive[5];
char dir[100];
char filename[100];
char fileext[10];
_splitpath(path,drive,dir,filename,fileext);
cout<<"filepath: "<<path<<endl
<<"drive: "<<drive<<endl
<<"dir: "<<dir<<endl
<<"filename: "<<filename<<endl
<<"fileext: "<<fileext<<endl;
system("pause");
return 0;
}
相关文章推荐
- yii2.0对数据库查询的一些简单操作
- 一次thinkphp任意代码执行
- php学习笔记(四)插入内容
- php学习笔记(三)SELECT查询
- php学习笔记(三)SELECT查询
- ubnutu-server-16.04版本上 搭建ftp服务器
- PHP代码注释小细节
- PHP 常用函数汇总
- 2016最热门的PHP框架
- 配置phpstorm + xdebug 调试php
- php -防止sql注入的函数
- gitlab 邮件配置(smtp)
- php环境配置
- 解决thinkPHP3.2.3使用Smarty模板后无法使用系统常量问题
- 配置GitLab 用smtp发邮件 (gitlab-6.7.3)
- php学习笔记(三)select处理
- RHEL 6 TFTP
- PHP——php——zend studio 断点调试
- PHP进阶(一)——数组与函数
- yii 操作session