prog.c:2:5: error: unknown type name ‘DIR’
DIR *pDir;
^
prog.c:4:5: warning: data definition has no type or storage class [enabled by default]
pDir = opendir ("testDir/testDir1");
^
prog.c:4:5: warning: type defaults to ‘int’ in declaration of ‘pDir’ [-Wimplicit-int]
prog.c:4:5: error: conflicting types for ‘pDir’
prog.c:2:10: note: previous declaration of ‘pDir’ was here
DIR *pDir;
^
prog.c:4:5: warning: implicit declaration of function ‘opendir’ [-Wimplicit-function-declaration]
pDir = opendir ("testDir/testDir1");
^
prog.c:4:5: error: initializer element is not constant
prog.c:5:5: error: expected identifier or ‘(’ before ‘while’
while ((pDirent = readdir(pDir)) != NULL)
^
prog.c:27:12: error: expected declaration specifiers or ‘...’ before string constant
printf("The filePath is: %s \n", filePath);
^
prog.c:27:38: error: expected declaration specifiers or ‘...’ before ‘filePath’
printf("The filePath is: %s \n", filePath);
^
prog.c:28:5: warning: data definition has no type or storage class [enabled by default]
strcpy(input_file_name, filePath);
^
prog.c:28:5: warning: type defaults to ‘int’ in declaration of ‘strcpy’ [-Wimplicit-int]
prog.c:28:5: warning: parameter names (without types) in function declaration [enabled by default]
prog.c:28:5: warning: conflicting types for built-in function ‘strcpy’ [enabled by default]
prog.c:29:12: error: expected declaration specifiers or ‘...’ before string constant
printf("input_file_name is: %s \n", input_file_name);
^
prog.c:29:41: error: unknown type name ‘input_file_name’
printf("input_file_name is: %s \n", input_file_name);
^
prog.c:32:5: error: unknown type name ‘FILE’
FILE *input_file2 = fopen(input_file_name, "r"); printf("line 127 \n");
^
prog.c:32:5: warning: implicit declaration of function ‘fopen’ [-Wimplicit-function-declaration]
prog.c:32:31: error: ‘input_file_name’ undeclared here (not in a function)
FILE *input_file2 = fopen(input_file_name, "r"); printf("line 127 \n");
^
prog.c:32:61: error: expected declaration specifiers or ‘...’ before string constant
FILE *input_file2 = fopen(input_file_name, "r"); printf("line 127 \n");
^
prog.c:33:24: error: expected ‘)’ before numeric constant
fseek(input_file2, 0, SEEK_END);printf("line 127 \n");
^
prog.c:33:44: error: expected declaration specifiers or ‘...’ before string constant
fseek(input_file2, 0, SEEK_END);printf("line 127 \n");
^