- #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;
- }