FILE *fid;
char fileName[256];
//positive samples(fist)
system("dir /s/b C:\\jianfeng\\debug_pics\\*.* > fist_list.txt");
fid = fopen("fist_list.txt","r");
if ( fid != NULL )
{
while ( fgets (fileName, sizeof(fileName), fid ) != NULL ) /* read a line */
{
fputs ( fileName, stdout ); /* write the line */
}
fclose ( fid );
}
else
{
perror ( "error" ); /* why didn't the file open? */
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment