i got that code to work using
int i=0;
while(i<size){
b.array[i] = array[i];
cout<<b.array[i]<<endl;
++i;
}
Type: Posts; User: nessie
i got that code to work using
int i=0;
while(i<size){
b.array[i] = array[i];
cout<<b.array[i]<<endl;
++i;
}
i tried implementing the code you suggested but i get an error message saying that my original object.array is undeclarred
could that be because i didnt put new array[0] in the constructor?
can anyone help me with copy constructors. i am writing a program with a class that stores an array of integers and im not sure how to write the copy constructor so that it copies the array into...