12345678910111213141516171819202122232425262728293031323334353637 |
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- int main(int argc, char *argv[]){
- FILE *app_input, *log_file;
- char app_input_file_name[64], log_file_name[64];
- int time_next;
-
- strcpy(app_input_file_name,"/shared/herc/app_input.txt");
-
-
-
- if ((app_input = fopen(app_input_file_name, "r")) == NULL){
- printf("Cannot open input file with file path = %s ",app_input_file_name);
- perror("open app_input");
- }
- fscanf(app_input,"%d",&time_next);
- printf("time next = %d\n",time_next);
-
-
- strcpy(log_file_name,"/shared/herc/log_file_test2.txt");
-
- if ((log_file = fopen(log_file_name, "w")) == NULL){
-
- perror("open log");
- }
- fprintf(log_file,"poutanes\n");
- fclose(app_input);
- fclose(log_file);
- return 0;
- }
|