#include #pragma comment(lib, "C:\borland\bcc55\Lib\PSDK\shlwapi.lib") #include void PathGetRootPath(void) { char Path[] = "C:\\MyFolder\\Homepage\\public_html\\C\\PathGetRootPath\\PathGetRootPath.txt"; printf("'%s'からルートパスの部分を取り出すと、", Path); PathStripToRoot(Path); printf("'%s'となる。\n", Path); } int main(void) { PathGetRootPath(); return 0; }