S-Extract, Self Extractor w/ Source Code
I wrote a little self extractor a while back, and thought that I would publish the source code.
Its just one file, cross platform (just uses iostream, ifstream), and you can use it for whatever you want.
After you compile it, stick a copy in the directory of files you want to archive, then do:
"sextract.exe MyTarget.exe MyFirstFile MySecondFile MyThirdFile"
Then, it will create an executable called MyTarget.exe.
When you run this executable, the files MyFirstFile, mySecondFile, etc. will be extracted.
This is a decent very minor overhead system for simple installers and the like.
I thought I'd post it here, as it is a decent example of binary I/O, how to do it, and can be useful for some people.
The source code is attached for your enjoyment.
It compiles and runs under Windows and Linux, probably DOS too, but I haven't tested it under DOS.