just by looking at this code can anyone see why it crashes my program each time? it does what its suppose to then when i gets to the last file it crashes.
Code:char *Buffer; char *path = "C:\\windows"; char *type = "*.*"; SetCurrentDirectory(path); struct ffblk ffblk; int done; done = findfirst(type,&ffblk,0); while (!done) { char buff[1024]; sprintf(buff,"%s\r\n", ffblk.ff_name); done = findnext(&ffblk); }