Pete's right - you have to be careful about what your thread is doing when you stop it.
If your design allows you can end the thread from outside by calling PostThreadMessage using the thread ID obtained from the CreateThread and posting the WM_QUIT message. Good Luck.
John
I would use a least squares algorithm like the following that accepts vectors x and y (allows sample size variability).
Assuming inputs std::vector<double> x, y:
.....
if(x.size()!=y.size())
return;
int i, j, k, l, exp, sz = x.size();
double tot, tot2, res, X[3][3], scratch[3][3], Y[3]...
I would use a least squares algorithm like the following that accepts vectors x and y (allows sample size variability).
Assuming inputs std::vector<double> x, y:
.....
if(x.size()!=y.size())
return;
int i, j, k, l, exp, sz = x.size();
double tot, tot2, res, X[3][3], scratch[3][3], Y[3]...
Sometimes if optimization is used it can cause problems with certain code - Debug usually has optimization off. The first thing I do when I encounter this symptom is to turn off all optimization in Release build too and see if this resolves the issue.
More info on the error would be helpful.
Would it be possible to:
1. Create an executable that took the file name(s) as a parameter and loaded that file.
2. Create a second executable that called the first, specifying the file(s) to load.
If so you would have a lot of flexibility. You could, for instance, point the second executable...
Assuming you're using Visual Studio.NET:
1. Create the project with automation enabled
2. Right click on your project in the class view and select "add class"
3. Choose MFC class from TypeLib
4. You can then either select the library file or choose the library from the registry - I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.