Hi there))
I cann't deal with the file opening operation -
char* fpath = "D:\TC\myprog\readit.txt";
FILE* fp;
fp = fopen (fpath, "r");
if (fp != NULL) printf ("\n(!) File opennig error\n");
else printf ("\n(+) File have been opened successfully!\n");
for( i=0;i<=n-1;i++)
{
a = getc(fp);
putchar(a-48);
putchar('\n');
}
For some reason the function does not return a NULL when the file is not in the specified location. And when he is - apparently did not read it.
Please help me understand - what's the problem.
Thank you in advance for your answers))