Dear all, I am using the keil UV2 for one of my application. In this application, I need to include files concept. For this, I write the program as follows, #include <stdio.h> int main() { FILE *fp; fp = fopen("c:\\RTC_Configuration.txt", "r"); } After compiling this program, it was showing the following error,
error c202: 'FILE' : undefined identifier error c202: 'fp' : undefined identifier
Exactly, what is this error? how can I removed from the application? Whether keil UV2 will support files concept or not?
Regards, Vijay
The error is very clearly and explicitly stated:
error c202: 'FILE' : undefined identifier
You know what an "identifier" is - don't you? If not, it's basic 'C' textbook time! blog.antronics.co.uk/.../08
And, if you don't know what "undefined" means, you can look it up in a dictionary...
For a small, limited target like the 8051, it's important to check what limitations apply: http://www.keil.com/support/man/docs/c51/c51_xa_librarydif.htm
fp = fopen("c:\\RTC_Configuration.txt", "r");
Does your 8051 have a hard drive? Does your 8051 have a filesystem that allows it to access files as C:\RTC_Configuration.txt