For some reason i am having trouble opening a file with fopen.
Code:#include <stdio.h>
main()
{
char quit;
FILE* file = 0;
file = fopen("Test", "r+");
if(file == 0)
{
printf("file dose not exist\n");
}
while((quit = getchar()) != 'q')
{
}
}
For some reason this will end up printing out "file dose not exist" for all of the following:
file = fopen("C:\Binary\Test", "r+");
file = fopen("\Binary\Test", "r+");
file = fopen("\Test", "r+");
file = fopen("Test", "r+");
Yes Test is a file that is in the folder Binary of which is in the C drive.
What is going on?