I have this class in which at some point I am computing a array of two doubles:
double* QSweep::computeIntersection(double m1, double b1, double m2, double b2){
double* v=new double[2];
v[0]= (b2-b1)/(m1-m2);
v[1]= (m1*b2-m2*b1)/(m1-m2);
return v;
}
In another function of the class I am using this array to work with its values. Depending on the values transmitted as parameters I obtained several values for this array of two daoubles. And I want to retain all this values in a array of array of two doubles. I have tried some ways but I have bur error, segementation fault or all problems as this. Any idea is welcomed.
thank you in advance, madalina