int main() {
int a;
FILE * f_input;
FILE * f_output;
int b;
USER_MENU:
printf("[1] Encode File\n");
printf("[2] Decode File\n");
printf("[3] Exit\n");
printf("What do you want to do? ");
scanf("%d", &a);
switch(a) {
case 1:
//open file input.txt for reading
f_input = fopen("input.txt", "r");
if(f_input == NULL){
printf("\nFile input.txt was not found!!");
printf("\nFind the file and select again.\n");
printf("\n");
goto USER_MENU;
}
//f_input and f_output are not null then read characters
while((b = fgetc(f_input)) != EOF)
{
//writes the characters in the input.txt to output.txt
printf("%c", b);
}
//closes the files
fclose(f_input);
fclose(f_output);
Also, when I open the source code there was a tab opening that says "There was a problem sending the command to the program". Can anyone identify the cause of this?
For one thing, you're using deprecated header files and functions. This is C code, not C++.
Also, get rid of those GOTO calls... I can't guarantee your safety in the programming community if you don't.