B
Bill Cunningham
I'm writing some new functions that work with math and should analyze stock
price information. This is what I have now.
main.h
#include <stdio.h>
#ifdef math
#include <math.h>
#endif
float relstr(float x,float y);
/* The relstr function is declared in the header */
The Body,
float relstr(float x,float y){n=x/y;
printf("%f",n);}
Simple enough. Now I want to not only be able to use this function to find
relative strength by inserting floating points into the parenthesis. I want
to attach the function to a stock name and load the results into it. I think
that might be the best way to do it. Like this.
msft.relstr(23.00,22.25);
I think I should use structs here. Right?
Bill
price information. This is what I have now.
main.h
#include <stdio.h>
#ifdef math
#include <math.h>
#endif
float relstr(float x,float y);
/* The relstr function is declared in the header */
The Body,
float relstr(float x,float y){n=x/y;
printf("%f",n);}
Simple enough. Now I want to not only be able to use this function to find
relative strength by inserting floating points into the parenthesis. I want
to attach the function to a stock name and load the results into it. I think
that might be the best way to do it. Like this.
msft.relstr(23.00,22.25);
I think I should use structs here. Right?
Bill