摘要:
#include<iostream>using namespace std; class Base{ public: void fn1(){ cout<<"Base fn1开始"<<endl; } void fn2(){ cout<<"Base fn2开始"<<endl; }};class Deri 阅读全文
posted @ 2023-04-14 22:01
不会JAVA的小袁
阅读(21)
评论(0)
推荐(0)
摘要:
#include<iostream>#include<stdlib.h>using namespace std;class Object{ public: Object() { cout<<"Object构造函数"<<endl; weight=0; } ~Object() { cout<<"Obje 阅读全文
posted @ 2023-04-14 21:48
不会JAVA的小袁
阅读(15)
评论(0)
推荐(0)
摘要:
#include<iostream>using namespace std;class Base{ public: Base(){}; void fn1()const{ cout<<"调用fn1"<<endl; } void fn2()const{ cout<<"调用fn2"<<endl; }};c 阅读全文
posted @ 2023-04-14 21:31
不会JAVA的小袁
阅读(9)
评论(0)
推荐(0)
摘要:
#include<iostream>#include<string>using namespace std;class Document{ public: Document(){ cin>>name; } void Display()const{ cout<<"Name:"<<name<<endl; 阅读全文
posted @ 2023-04-14 21:13
不会JAVA的小袁
阅读(16)
评论(0)
推荐(0)