Introduction
The Volvo model pages on this web site were generated from a database
built into a C++ progran that I wrote called cars.cpp. It is nothing
fancy; I dumped what info I had on each model year into C structures,
then wrote that information to text files that contained html tags so
that a browser could be used to display the text files, anticipating how
the typical user might want to access information on Volvo cars. The information
in the files is sifted and sorted in a few different ways.
In case you are interested, here is the code listing:
- cars.cpp - This is the main function. It contains
all the finction prototypes and most of the code. The code got too big
to conveniently put into one file so I broke out the functions that
contain the database into separate files for ease of programming access.
The main file, cars.cpp, contains #include statements to bring
the other files into itself so that, at compile time, it really is one
big file. I used C++ Builder 4 as the C++ compiler but any C compiler
should do the trick. It is C code. I did not uses any C++ features.
- makeall_chassis.cpp - This file
contains the chassis database.
- makeall_trannies.cpp - This file
contains the transmission database.
- makeall_engines.cpp - This file
contains the engine database.
- makeall_turbos.cpp - This file contains
the turbo database.
- makeall_cars.cpp - This file contains
the car model database.
- makeall_sources.cpp - This files
contains the information source database.
You are free to use this code for non-profit uses provided the appropriate
acknowledgements are made. Enjoy. If you do use the code and make improvements,
please do let me know.
Comments, additions, corrections? Contact
me.
|