#include <iostream>
	
	
		using namespace std;
	
	
		class T
	
	
		{
	
	
		    int x;
	
	
		    public:
	
	
		    T (int xx){x=xx;  cout<<"construct: "<<x<<endl;} 
	
	
		                                                                                                  //(十二)     
	
	
		    ~T ()   {cout<<"destruct: "<<x<<endl;} 
	
	
		    T(T &t) { this ->x=t.x+9;  cout<<"copy construct: "<<x<<endl;}
	
	
		};
	
	
		int main()
	
	
		{
	
	
		    T t1(100),   t2(t1),  t3(t2);
	
	
		    cout<<"*************\n"; 
	
	
		    return 0;
	
	
		}
	
	T t1(100),   t2(t1),   t3=t2;
			#include <iostream>
		
		
			using namespace std;
		
		
			class T
		
		
			{
		
		
			    int x;
		
		
			    public:
		
		
			    T (int xx){x=xx;  cout<<"construct: "<<x<<endl;} 
		
		
			                                                                                         //(十3)     
		
		
			    ~T ()   {cout<<"destruct: "<<x<<endl;} 
		
		
			    T(T &t) { this ->x=t.x+9;  cout<<"copy construct: "<<x<<endl;}
		
		
			};
		
		
			int main()
		
		
			{
		
		
			    T t1(100),   t2(t1),   t3=t2;
		
		
			    cout<<"*************\n";
		
		
			    return 0;
		
		
			}
		
	
京公网安备 11010502036488号