Home Segments Index Top Previous Next

13: Mainline

Finally, the book develops a simple, yet realistic C++ program, which you see in many versions as your understanding of the language increases. In its ultimate version, the program reads information from a file describing a railroad train, computes the load-bearing volume of each box car and tank car using formulas drawn from descriptions of boxes and cylinders, and displays a car-by-car report. Programs similar to the one developed can help you to manage a railroad, either model or real.