When I tried to copy a vector to a new one using the operator =, everything went fine until I changed a value of the original vector, the second vector changed alongside the original vector. It is expected that the second vector didn't change whether the original one made any change.
I suggest implementing a function cvector_copy() to fix the issue.
When I tried to copy a vector to a new one using the operator
=
, everything went fine until I changed a value of the original vector, the second vector changed alongside the original vector. It is expected that the second vector didn't change whether the original one made any change. I suggest implementing a functioncvector_copy()
to fix the issue.