level 6
// crt_chdir.c// arguments: C:\WINDOWS/* This program uses the _chdir function to verify that a given directory exists. */#include
#include
#include
#include
int main( int argc, char *argv[] ){ if(_chdir( argv[1] ) ) { switch (errno) { case ENOENT: printf( "Unable to locate the directory: %s\n", argv[1] ); break; case EINVAL: printf( "Invalid buffer.\n"); break; default: printf( "Unknown error.\n"); } } else system( "dir *.exe");}
2007年10月08日 07点10分