"Bill Cunningham" <> writes:
> I have decided on how I want to do this. Old data will be stored to a
> file. I only want the functions defined as Sma or simple moving average, an
> arithmetic mean; to do the calculating work. I want to be able to take as
> many doubles as I want and sum them and divide by the number of doubles.
> Then the function would return a value that would be saved as a text or
> binary file via another function. This is what little bit I have so far.
>
> #include "ta.h"
>
> double Sma (double *num) {
> int count=*num;
>
> The header ta.h says this...
>
> #include <stdio.h>
> #include <stdlib.h>
>
> double Sma (double *);
*sigh*
Why does ta.h include stdio.h and stdlib.h? Does it use any
declarations from either of those headers?
In Sma, why do you store a double in an int? And how do you expect it
to know how many doubles to add together? Where are these double
values going to come from?
--
Keith Thompson (The_Other_Keith)
kst- <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"