Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 03-27-2004, 09:05 PM   #1
Mondsreitersmann
 
Nuclear Krusader's Avatar
 
Join Date: Jul 1999
Location: Skingrad
Posts: 8,781
Pissed Statistics program

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.
Nuclear Krusader is offline   Reply With Quote
Old 03-28-2004, 01:03 PM   #2
aym
Registered User
 
aym's Avatar
 
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;
Same for function sum, line 67:
Code:
mean = sum(value, no_of_elements) / float(no_of_elements);
aym is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:50 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2