2
Contributors
4
Replies
5
Views
11 Years
Discussion Span
Last Post by sofianos
0

how to create an archive depends on the compiler you are using. *nix compilers normally use the ar program.

structures are not put into archives, which contains only compiled object code. Put the structure in a header file that can be easily accessed by any *.cpp or *.c file that you want to use it in.

0

i mean how t create a file (FILE fsubs etc), use it, delete it search it and generally manage it.

0

Oh! Well, read the docs for fopen() function, it has an argument that will cause fopen() to create the file if it does not exist. Here is one of several links to the man pages for that function. Since fopen() is a standard C function it will work the same on most operating systems and compilers.

Here are some other useful links.

and save a struct in archive

The easiest way to save a structure in a file is to create the structure with a word processing program such as Notepad.exe. Probably all compiler IDEs will also let you save them to a file.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.