大龙的博客

常用链接

统计

最新评论

PathRemoveFileSpec

#include <windows.h>
#include <iostream.h>
#include "Shlwapi.h"
void main( void )
{
// Path to include file spec.
char buffer_1[] = "C:\\TEST\\sample.txt";
char *lpStr1;
lpStr1 = buffer_1;
// Print the path with the file spec.
cout << "The path with file spec is          : " << lpStr1 << endl;
// Call to "PathRemoveFileSpec".
PathRemoveFileSpec(lpStr1);
// Print the path without the file spec.
cout << "\nThe path without file spec is       : " << lpStr1 << endl;
}
OUTPUT:
==================
The path with file spec is          : C:\TEST\sample.txt
The path without file spec is       : C:\TEST

posted on 2008-03-11 12:16 大龙 阅读(3704) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   博问   Chat2DB   管理