摘要: 1 #include<iostream> 2 using namespace std; 3 class zhong 4 { 5 private: 6 int shi; 7 int fen; 8 int miao; 9 public: 10 zhong operator++() 11 { 12 mia 阅读全文
posted @ 2023-05-11 21:47 Code13 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 using namespace std; 3 class Shape 4 { 5 public: 6 Shape(){} 7 ~Shape(){} 8 virtual float getArea() {} 9 }; 10 class Circle:pub 阅读全文
posted @ 2023-05-10 18:45 Code13 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 using namespace std; 3 class BaseClass 4 { 5 public: 6 virtual void fn1(); 7 void fn2 (); 8 }; 9 void BaseClass::fn1() 10 { 11 阅读全文
posted @ 2023-05-10 18:44 Code13 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 using namespace std; 3 class Shape 4 { 5 public: 6 Shape(){} 7 ~Shape(){} 8 virtual float getArea()=0; 9 virtual float getPerim 阅读全文
posted @ 2023-05-08 22:23 Code13 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 using namespace std; 3 class Mammal 4 { 5 public: 6 Mammal() 7 { 8 cout<<"Mammal constructor...\n"; 9 } 10 ~Mammal() 11 { 12 co 阅读全文
posted @ 2023-05-08 22:22 Code13 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 #include<cmath> 3 using namespace std; 4 5 class Point 6 { 7 private: 8 int x; 9 int y; 10 int z; 11 public: 12 void Input(); 1 阅读全文
posted @ 2023-05-04 21:57 Code13 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 using namespace std; 3 class Rectangle { 4 public: 5 int j; 6 void area(int X = 0, int Y = 0, int A = 0, int B = 0); 7 private: 阅读全文
posted @ 2023-04-27 22:33 Code13 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 #include<string> 3 using namespace std; 4 int main() 5 { 6 int a[5]={},b; 7 cout<<"请输入5个元素"<<endl; 8 for(b=0;b<5;b++) 9 { 10 ci 阅读全文
posted @ 2023-04-26 22:45 Code13 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <cmath> 3 using namespace std; 4 5 class Complex { 6 private: 7 float re, im; 8 public: 9 Complex(float r, float i = 阅读全文
posted @ 2023-04-25 21:56 Code13 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 using namespace std; 3 class DataType 4 { 5 public: 6 DataType(int i) 7 { 8 data.i = i; 9 type = INT; 10 } 11 DataType(char c) 阅读全文
posted @ 2023-04-24 22:31 Code13 阅读(49) 评论(0) 推荐(0) 编辑