CARS.cpp

The Code that Built the Model Database
, HOME (url:www.nuceng.ca/bill)


Introduction

The Volvo model pages on this web site were generated from a C++ program that I wrote called cars.cpp. It is nothing fancy; I dumped what info I had on each model year into an Excel spreadsheet. This spreadsheet contains some VBA macros that generate tab delimited text files that cars.cpp reads to build C structures. This information is then used to write text files that contain 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 and the data:

  • cars.cpp (cpp 36kb)- 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.
  • volvo_data2.xlsm (xlsm 124 kb) - This Excel 2007 spreadsheet contains VBA macros used to export the data to text files and for creating the httml files. You won't be needing those macros so you can disable them when prompted by Excel as you open the file.

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.