how to solve this error.I am trying to read each character from a file and want to display it on console window.But could display the result in visual studio 2008(VC++).I am getting the debug assertion failed !!.could you please let me know where i went wrong.
here is my code :
fp=fopen("21-11-11.txt","r");//open the specific file in read mode
if(fp==NULL)//if the file doesnt conatins any thing or nullvalues return the below statement
printf("File not Found!!");//file not fonde in console window.
c=fgetc(fp);// get each character from file
putchar(c);// print each character
}while(c!=EOF); //check until the end of file
fclose(fp);//close the file
please any suggestion to resolve this issues :debug assertion failed" in VC++
Thanks in advance