First page Back Continue Last page Overview Graphics
Copy Constructor
C++
- All parameters to functions are passed by value
- Including Objects
- New objects created in function
- Special constructor call in this case
- Copy Constructor
- Default implementation provided by compiler
- Uses bitwise copy
- Can be an issue if using dynamically allocated memory
- example5.cpp
- Perl
- All parameters to functions are passed by reference