*length=cpy.length; and *width=cpy.width; but got an error message and switched it to the way you see now. why is that correct, is it even correct? |
|
*length=*(cpy.length);, since the length variable of cpy is also a pointer. Fix that everywhere, and the rest looks good. Note, you should have gotten a pretty big hint from the compiler in the error message it generated - learn to read and understand those errors, and you will usually be able to solve your own problems.