Created
January 24, 2011 21:50
-
-
Save berkeley-db/794032 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef std::map<const char *, Car> owner_car_map_t; | |
owner_car_map_t ocmap; | |
while (has more owner-car pairs to input) { | |
// Accept input data for owner name and car, create car. | |
cin>>owner>>len>>width>>height>>hp>>ncyl>>displ; | |
Engine *pEngine = new Engine(hp, ncyl, displ); | |
Car car(len, width, height, pEngine); | |
ocmap[owner.c_str()] = car; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment