Forum: C++ 2 Days Ago |
| Replies: 9 Views: 232 polynomial polynomial :: derivative(void)
{
if(!isEmpty())
{
double *coef;
coef = new double[(_degree-1)];
for(int i=0; i<(_degree); i++)
{
coef[i]=(i+1)*(_coef[i+1]);
} |
Forum: C++ 4 Days Ago |
| Replies: 9 Views: 232 Checking the variable "outpoly I observe its member variables. Checking with other inputs I observe only the pointer "_coef" becomes erroneous.
Thank you for the suggestion of using an explicit... |
Forum: C++ 4 Days Ago |
| Replies: 9 Views: 232 I checked the debugger and it deletes the data just right before it returns. I don't seem to get errors at cout, but since the data is invalid error does pop up.
I'll check on it more closely, but... |
Forum: C++ 4 Days Ago |
| Replies: 9 Views: 232 The "outpoly" within the function "derivative" is supposed to return the derivative of the polynomial it is called from.
I followed my debugger and it showed me that the program cleared the memory... |
Forum: C++ 5 Days Ago |
| Replies: 9 Views: 232 polynomial polynomial :: derivative(void)
{
polynomial outpoly;
outpoly._coef = new double [_degree];
outpoly._degree = (_degree-1);
for(int i=0; i<(_degree); i++)
{... |
Forum: C++ 5 Days Ago |
| Replies: 2 Views: 242 Thank you jonsca, I eventually got the solution with some research. I didn't, rather, couldn't, use your resource though. I couldn't open it. :(
Thank you. :D |
Forum: C++ 7 Days Ago |
| Replies: 2 Views: 242 #include <cmath>
long double NR(long double sample)
{
return (abs(f(sample)))<=1e-10 ? sample: NR( (sample - f(sample)/fp(sample)));
}
long double f(long double sample)
{
return... |
Forum: Windows Vista and Windows 7 Mar 25th, 2009 |
| Replies: 54 Views: 24,415 I figured as much with OS X, but thanks for the heads up. |
Forum: Windows Vista and Windows 7 Mar 25th, 2009 |
| Replies: 54 Views: 24,415 That's funny because I have Vista installed on a 25 Gb partition and XP on a 15 GB partition with all my data on a 26 GB partition. I also have a hidden recovery partition, all of which would add up... |