#include "cCylinder.h" void cCylinder::SetVolume() { //volume = area * height; //これはできない! areaはベースのプライベートメンバだから volume = GetArea() * height; } void cCylinder::PrintMember()//メンバ関数(公開) { cout << "高さ : " << height << endl; cout << "体積 : " << volume << endl; }