21 lines
552 B
C
21 lines
552 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
char full_path[ _MAX_PATH ];
|
||
|
char drive[ _MAX_DRIVE ];
|
||
|
char dir[ _MAX_DIR ];
|
||
|
char fname[ _MAX_FNAME ];
|
||
|
char ext[ _MAX_EXT ];
|
||
|
|
||
|
_makepath(full_path,"c","watcomc\\h\\","stdio","h");
|
||
|
printf( "Full path is: %s\n\n", full_path );
|
||
|
_splitpath( full_path, drive, dir, fname, ext );
|
||
|
printf( "Components after _splitpath\n" );
|
||
|
printf( "drive: %s\n", drive );
|
||
|
printf( "dir: %s\n", dir );
|
||
|
printf( "fname: %s\n", fname );
|
||
|
printf( "ext: %s\n", ext );
|
||
|
}
|