|
|
发表于 2006-10-7 22:14:00
|
显示全部楼层
Re:有取得文件相对路径的方法吗(以字符或串形式)
API的文件路径获取的办法就很多了。如果使用CRT的话
_chdir, _wchdir
Change current working directory
_chdrive
Change current drive
_getcwd, _wgetcwd
Get current working directory for default drive
_getdcwd, _wgetdcwd
Get current working directory for specified drive
_getdiskfree
Populates a _diskfree_t structure with information about a disk drive.
_getdrive
Get current (default) drive
_getdrives
Returns a bitmask representing the currently available disk drives.
_mkdir, _wmkdir
Make new directory
_rmdir, _wrmdir
Remove directory
_searchenv, _wsearchenv, _searchenv_s, _wsearchenv_s
Search for given file on specified paths
MSDN中的 FileHandling 页(CRT的)
另外标准的C++流式的文件目录操作还有Boost的支持。 |
|