This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can i use file management in C

Hello just want to ask whether I can use file management in uVision3? Because I tried to use which is this " file *fp;" but i say file is an undefined identifier. What should I do to open a file to read and write can anyone tell me thanks!

The reason why I want to open a file to read and write is because I want to pass value from other program to this program. If anyone know the other method can teach me please thank alot!

Parents
  • "Hello just want to ask whether I can use file management in uVision3?"

    Yes. uVision can open, close, read, and write files.

    "Because I tried to use which is this " file *fp;" but i say file is an undefined identifier."

    That would be "FILE", but I'm still at a loss as to what you want the IDE to do with that. Do you mean that you were trying to use uVision to cross-compile for a target system where "FILE" might be relevant?

    "What should I do to open a file to read and write can anyone tell me thanks!"

    You probably want to use a compiler for your host environment that supports file I/O.

    "The reason why I want to open a file to read and write is because I want to pass value from other program to this program."

    What is "the other program"?
    What is "this program"?

    "If anyone know the other method can teach me please thank alot!"

    What "other method" are you referring to? POSIX file I/O library functions versus Standard C file I/O library functions? Besides, how does any of that relate to C51?

Reply
  • "Hello just want to ask whether I can use file management in uVision3?"

    Yes. uVision can open, close, read, and write files.

    "Because I tried to use which is this " file *fp;" but i say file is an undefined identifier."

    That would be "FILE", but I'm still at a loss as to what you want the IDE to do with that. Do you mean that you were trying to use uVision to cross-compile for a target system where "FILE" might be relevant?

    "What should I do to open a file to read and write can anyone tell me thanks!"

    You probably want to use a compiler for your host environment that supports file I/O.

    "The reason why I want to open a file to read and write is because I want to pass value from other program to this program."

    What is "the other program"?
    What is "this program"?

    "If anyone know the other method can teach me please thank alot!"

    What "other method" are you referring to? POSIX file I/O library functions versus Standard C file I/O library functions? Besides, how does any of that relate to C51?

Children
No data