void deleteFile( FAT *allotable ) {
/* PRECONDITION: This function expects a FAT structure that is valid.
* POSTCONDITION: A file is flagged as removed from the disk and it will
* be possible to write over it
*/
// Local variables
unsigned char test[9] = { 0 };
// Select file to remove
// TODO: The user will select the file to remove based on the
// listing in listDir
// For testing, we are removing file at location 0 in the entry
fgets( test, NAME_SIZE, stdin );
return;
}
当我运行该函数并输入一个字符串时,我看到该字符串打印回标准输出中。我确定我的缓冲区有问题,但我似乎无法解决这个问题。