/* MAKEPATH.C */ #include <stdlib.h> #include <stdio.h> void main( void ) { char path_buffer[_MAX_PATH]; char drive[_MAX_DRIVE]; char dir[_MAX_DIR]; char fname[_MAX_FNAME]; char ext[_MAX_EXT]; _makepath( path_buffer, "c", "\sample\crt\", "makepath", "c" ); printf( "Path created with _makepath: %s ", path_buffer ); _splitpath( path_buffer, drive, dir, fname, ext ); printf( "Path extracted with _splitpath: " ); printf( " Drive: %s ", drive ); printf( " Dir: %s ", dir ); printf( " Filename: %s ", fname ); printf( " Ext: %s ", ext ); }