print out address of object to copy in copy constructor
This commit is contained in:
		
							parent
							
								
									235d604757
								
							
						
					
					
						commit
						66d0728e00
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -7,7 +7,7 @@ class Animal {
 | 
				
			||||||
      std::cout << "constructor" << std::endl;
 | 
					      std::cout << "constructor" << std::endl;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    Animal(const Animal& other) {
 | 
					    Animal(const Animal& other) {
 | 
				
			||||||
      std::cout << "copy constructor" << std::endl;
 | 
					      std::cout << "copy constructor (" << &other << ")" << std::endl;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Note: using *virtual* does the difference here!
 | 
					    // Note: using *virtual* does the difference here!
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue