0
How I save datas of archive to array in c?
3 Antworten
0
What archive?
0
Docs with extension .txt, .ppm..
0
Use <studio.h> to open the file (fread()) and read it (fread()).
https://en.cppreference.com/w/c/io
A file is just a sequence of bytes, and fread will put size*count bytes in the buffer. The buffer can be, for example, an array of chars (since a char is a byte).
The rest of <stdio.h> provides helper functions for reading text files.
To read other files (like image files), you can use a library, or find the format specification, which will tell you should interpret the bytes, if you want to do it manually.