- 博客(10)
- 收藏
- 关注
原创 第七章
1.#include #include using namespace std; void area(float a,float b,float c) { double s,area; if(a+b cerr<<"a+b<=c,error!"<<endl; else if(b+c cerr<<"b+c<=a
2015-06-10 10:53:59 202
原创 数据结构相关题目
#include #include #include class Student { friend class List;protected: char name[20]; int number; static Student *ptr; Student *next;pub
2015-06-02 18:29:31 297
原创 第6章
1.#include class Point {public: Point(float x=0,float y=0); void setPoint(float,float); float getX() const {return x;} float getY() const {return y
2015-05-24 13:43:41 261
原创 第5章
1.#include using namespace std; class Student{ public: void get_value() {cin>>num>>name>>sex;} void display() { cout cout cout } private:
2015-05-24 13:26:38 268
原创 修改create_object函数
#include using namespace std;class Shape { public: virtualdouble getArea() const =0; virtualvoid print() const =0;
2015-05-19 20:51:32 256
原创 C++第四章
1.#include using namespace std; class Complex{ public: Complex() { real=0; imag=0; } Complex(double r,double i) { real=r;
2015-05-13 10:58:40 203
原创 TimeDate
#includeclass Time{public: Time(){} Time(int h,int m,int s) { hour=h; minute=m; second=s; } friend istream &operator>>(istream &,Time &);
2015-05-12 20:10:33 265
原创 字符串的运算符重载
#include #include #includeclass String{public:String(){p=NULL;}String(const String &);String(char *str);~String();String & operator=(const String &);String operator+(const String
2015-04-27 23:07:08 462
原创 作业
第七题#include using namespace std;int main(){ int max(int a,int b,int c=0); int a,b,c; cin>>a>>b>>c; cout cout return 0;}int max(int a,int b,int c){if(a if(a return a;}
2015-03-31 13:18:05 216
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人