Exeption unhandled

Nov 20, 2018 at 3:24pm
Hi guys.I have problem my code wont debug .
V
This is Vector.cpp
1
2
3
4
5
6
7
8
9
10
  Vector Vector::Add(const Vector &v1)
{
	int i;
	Vector v;
	if (v1.dim == this->dim)
		for (i = 0; i < v1.dim; i++)
	v.vector[i] = v1.vector[i] + this->vector[i]; //vector[i] is type of //Point(another class of points with 3 dimensions(x,y,z))
//here is exception unhandled
	return v;
}
Nov 20, 2018 at 4:13pm
I would think that v is empty and thus v.vector[i] is invalid.
Nov 20, 2018 at 6:18pm
Thank you for the answer.
Topic archived. No new replies allowed.