|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Mondsreitersmann
Join Date: Jul 1999
Location: Skingrad
Posts: 8,781
|
I am getting three errors while trying to compile this program which are:
as5pr1.cpp: In function `int main()': as5pr1.cpp:25: warning: the address of `float mean(float*, int)', will always be `true' as5pr1.cpp: In function `float mean(float*, int)': as5pr1.cpp:67: invalid operands of types `float ()(float*, int)' and `float' to binary `operator/' Execution terminated I'd greatly appreciate any input about this. TIA
__________________
Darum still, füg' ich mich, wie Gott es will. Nun, so will ich wacker streiten, und sollt' ich den Tod erleiden, stirbt ein braver Reitersmann. |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Nov 2001
Posts: 1,965
|
You forgot to pass parameters to function mean in line 25, I think it should be:
Code:
cout << "The mean is: " << mean(value, no_of_elements) << endl; Code:
mean = sum(value, no_of_elements) / float(no_of_elements); |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|