主题:求解
#include<iostream.h>
Class A{ int a; public:A(int aa) {a=aa; cout<<“左”;}
~A( ) { cout <<“右”;} void outa();{ cout<<a; } };
Void main( ) {A *p=new A(5000); p->outa( ); delete p; }
结果:
#include<iostream.h>
Class A{ int a; public:A(int aa) {a=aa; cout<<“左”;}
~A( ) { cout <<“右”;} void outa();{ cout<<a; } };
Void main( ) {A *p=new A(5000); p->outa( ); delete p; }
结果:
沙发
您尚未登录,请登录后再回复。点此登录或注册