#include struct Car { Car(int w) : wheels(w) {} int wheels; }; struct Toyota : public Car { // member initializer list can be used for base classes or member variables Toyota(int w, double p) : Car(w), price(p) {} double price; }; int main(int argc, char** argv) { Toyota prius(4, 25000); std::cout << "price: " << prius.price << std::endl; std::cout << "wheels: " << prius.wheels << std::endl; return 0; }