Show activity on this post. int main() int *a; a=new int[4]; for(int i=0;i<5;i++){ a[i]=i; cout<<a[i]<<endl; } Array array1(a);//Constructor invoked array1. Print(); Array another=array1;//copy constructor invoked another. Print();
Show activity on this post. int main() int *a; a=new int[4]; for(int i=0;i<5;i++){ a[i]=i; cout<<a[i]<<endl; } Array array1(a);//Constructor invoked array1. Print(); Array another=array1;//copy constructor invoked another. Print();