摘要: 加个<fieldset></fieldset>就可以了。 阅读全文
posted @ 2012-07-02 13:53 简单--生活 阅读(297) 评论(0) 推荐(0)
摘要: // 4 单一继承/*#include <iostream>using namespace std;class fatcher{private: int height, width;public: void setHeight(int h){ this->height = h; } void setWidth(int w){ this->width = w; } void show() { cout<<"身高="<<height<<" 体重="<<width<<endl; 阅读全文
posted @ 2012-07-02 00:39 简单--生活 阅读(214) 评论(0) 推荐(0)
摘要: //1 运算符重载#include <iostream>using namespace std;class num{public: num(){ n=1;} ~num(){} int get()const{ return n;} void set(int x){ n = x;}private: int n;};int main(){ num n; n.set(11); cout<<n.get()<<endl; //n++; return 0;}/*//2 在成员函数中实现自加#include <iostream>using namespace s 阅读全文
posted @ 2012-07-02 00:36 简单--生活 阅读(367) 评论(0) 推荐(0)
简单--生活(CSDN)