![]() |
![]() |
![]() |
![]() |
![]() |
|
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.