简体   繁体   中英

How to save array in .txt (C)

I would like to be able to read the file and then assign the.txt values in the array for the next time I start the program.

The documentation of the function fwrite() on the site cppreference.com contains an example of writing an array to file and then reading it back. This seems to be exactly what you want.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM