warning: unknown escape sequence
Hi everyone,
I'm doing some file input/output work here in C and received this warning during compilation (GCC). My research indicates that this error is in response to white space or a character cancellation function or something like that. I'm not 100% sure exactly what it means. I was hoping some of you could help! My code works fine, but the following warning does appear.
Code:
warning: unknown escape sequence: '\040'
Here's my code (excluding a bunch of comments at the bottom of the file).
Code:
#include <stdio.h>
int main(void){
FILE *file;
file = fopen("Running\ Practice.c", "a");
fprintf(file, "Testing...\n");
fclose(file);
}
I believe the error I received has to do with either the '\n' I used when appending text to my file, or something to do with there being a space in the file name itself.
Any information (in lamen's terms if possible), would be greatly appreciated!
Thanks,
Harvey
warning: unknown escape sequence: '\040' [ANWER]
Quote:
warning: unknown escape sequence: '\040'
Started by Harvey Meale, 4 Hours Ago
I can't open the thread mentioned above, but I would say that I know the answer.
This usually occurs, when you copy paste code. Check the single quotes and double quotes. Delete them and rewrite your self (only the quotes). Hope this fixes the warning.