摘要:
源程序: //基类与子类占用空间及字节对齐#include<iostream>using namespace std; class BaseClass{ int v1,v2; char v4;public: int temp1(){}}; class DerivedClass:public Base 阅读全文
posted @ 2020-02-04 14:41
bobo哥
阅读(100)
评论(0)
推荐(0)
摘要:
源程序: #include<iostream>using namespace std; class CDemo{private: int n;public: CDemo(int i=0):n(i){} CDemo & operator++(); //用于前置形式 CDemo operator++(i 阅读全文
posted @ 2020-02-04 13:35
bobo哥
阅读(184)
评论(0)
推荐(0)
摘要:
源程序: #include<iostream>using namespace std; class CDemo{private: int n;public: CDemo(int i=0):n(i){} CDemo & operator++(); //用于前置形式 CDemo operator++(i 阅读全文
posted @ 2020-02-04 13:32
bobo哥
阅读(171)
评论(0)
推荐(0)
摘要:
源程序: #include<iostream>using namespace std; class myComplex{ double real,imag;public: myComplex(double r=0,double i=0):real(r),imag(i){}; operator dou 阅读全文
posted @ 2020-02-04 13:30
bobo哥
阅读(119)
评论(0)
推荐(0)
摘要:
源程序: #include<iostream>#include<string>#include<cstdlib>using namespace std; class myComplex{private: double real,imag;public: myComplex():real(0),ima 阅读全文
posted @ 2020-02-04 13:27
bobo哥
阅读(130)
评论(0)
推荐(0)
摘要:
源程序: #include<iostream>#include<string>#include<cstdlib>using namespace std; class myComplex{private: double real,imag;public: myComplex():real(0),ima 阅读全文
posted @ 2020-02-04 13:19
bobo哥
阅读(139)
评论(0)
推荐(0)
摘要:
源程序: #include<iostream>using namespace std; class pointer{public: int a; int *p; //指向整型数的指针 pointer() { a=100; p=new int(10); } pointer(const pointer 阅读全文
posted @ 2020-02-04 12:56
bobo哥
阅读(138)
评论(0)
推荐(0)
摘要:
源程序: #include<iostream>using namespace std; class pointer{public: int a; int *p; //指向整型数的指针 pointer() { a=100; p=new int(10); } pointer(const pointer 阅读全文
posted @ 2020-02-04 12:54
bobo哥
阅读(131)
评论(0)
推荐(0)
摘要:
源程序: #include <iostream>#include<string>using namespace std; class myComplex{private: double real, imag;public: myComplex(); myComplex(double r, doubl 阅读全文
posted @ 2020-02-04 12:46
bobo哥
阅读(121)
评论(0)
推荐(0)

浙公网安备 33010602011771号