Home Segments Index Top Previous Next

624: Mainline

Although you could define constructors for each car class that take input_buffer arguments, that solution is inelegant, because the serial_number member variable is a member variable in the railroad_car class, and, accordingly, the serial_number member variable should be assigned by a constructor in that railroad_car class.