How do you copy a copy constructor array?

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();

Sizin İçin Seçtik  What is copy constructor explain?

Leave a Reply

Your email address will not be published. Required fields are marked *