sijoonlee / cpp_class_practice

operator overloading, copy constructor and etc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C++ Class Practice

Constructor
Copy Constructor
Assignment Operator Overloading (Copy)
Stream Insertion Operator Overloading (<<)

Compile

g++ -std="c++17" main.cpp

Run

./a.out

Output

directory_x instantiated
Two data added into directory_x
Jone Doe 111 1 James Brown 222 2 
111
showPhoneOffice called
2getNoEmployees() called
wirteDirecotry() called, written into output_a.text
Phone array declared and initialized with 2 dataset
directory_y instanciated with Phone array
directory_y : 
Mountain 333 3 River 444 4 
Copy assignment operator called, directory_x = directory_y
directory_x : 
Mountain 333 3 River 444 4 
directory_z is instanciated by copy constructor, directory_y used : 
directory_z : 
Mountain 333 3 River 444 4 

About

operator overloading, copy constructor and etc


Languages

Language:C++ 100.0%