hello everyone..i actually have a doubt in C programming but since this part of the code is similar to C++, im posting it here in this forum.
any form of help will be appreciated.
but when i compile, there is this error coming out, reading, "undeclared identifier". this comes in the function called ObtainStatistics.
the variables, sumX2, sumY2, sumXY..and so on are giving me errors.
I am not sure why i get these errors since i have already declared these variables upfront.
if anyone knows what is wrong with my code, pls help
thanks
The function definition is put after main. You need to let it know that there is such a function to use by putting the function name before main. double ObtainStatistics, double y[][], int x);
(just put that before main and code what it does after main)
hey!
thanks for the help, but the error still exists. I took the function, double ObtainStatistics, (double y[][], int x); and put it before main and left the rest of the code as it was.
Still, the compiler is no able to identify the variables,sumX2, sumY2, sumXY..and so on.
Ah sorry... I misread the question. I don't really know C much but i'd pretty much guess that it's because the variables are only declared in main() and the function has no idea what they are.