Hello I am trying to do an assignment that dot products two vectors while passing the following tests.
but it will not pass my tests
here is my code for dot product
Line 4 appears to blow away the input vector.
Line 5: If it somehow survived line 4, then line 5 changes its size.
Line 6: Given line 5, when would a.getSize() NOT equal mySize?
In your test code, rather than calling assert(), I suggest that you print the product and the expected value. If the result is wrong, then it will be helpful to know what the incorrect value is.