为什么vc++输不出来。
class Rect{private:float length,width;public:void set(float x,float y);float peri();float area();};void Rect::set(float x,float y){length=x;width=y;}float Rect::peri(){return (length+width)*2;}float Rect::area(){return(length*width);}void main(){Rect r;r.set(1.0f,2.0f);r.peri();r.area();}
qq_Linjj蓝极光辉_04362138
浏览 1642回答 1