马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
#include <stdio.h>
#include <stdlib.h>
static void Usage(void) {
fprintf(stderr, "Usage: FileName, FileName1, FileName2, ...\n");
exit(0);}
int main(int argc, char *argv[]) {
FILE *fileopen = NULL;
const char *Mode[] = {"r", "w", "a", "r+", "w+", "a+"};
if (argc == 1) { /*
* If it is the first one, argv [0] should be the name of the program
* itself, indicating that there is no other file name
*/
Usage();
}
for (int i = 1; i < argc; i++)
{
fopen(argv, Mode[4]);
}
fclose(fileopen);
return 0;
}
|