#include #include using namespace std; class Tree { float height; float width; float trunk_thickness; float weight; public: Tree(float h, float w, float t, float m) : height(h), width(w), trunk_thickness(t), weight(m) {} bool fits_in_house(float ceiling_height, float door_width, float max_weight){ if(ceiling_height < height) return false; if(door_width < width*1.5) return false; if(max_weight < weight) return false; return true; } }; int main(){ Tree setter(9, 5, .25, 30), rocky(5, 3, .1, 20); float A[4]; memcpy(A, &rocky, sizeof(A)); cout << sizeof(setter) << endl; for(int i = 0; i < 4; i++) cout << "A[" << i << "] = " << A[i] << endl; ((float*)&setter)[1] = 352.0; bool answer = setter.fits_in_house(7, 3, 20); cout << sizeof(answer) << endl; return 0; }