If you are just starting, you'll probably want a loop (the STL does have a function to do [edit]summing[/edit], but I'm guessing that if you posted this question then you need to start further back). The average would be the sum divided by the total number of items.
Dave Sinkula
long time no c
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
It would really benefit to you if you could read on some introductory material to the C++ programming language or some newbie book like "Sams Teach yourself C++ in 21 days" to get the hang of the subject.
This forum will help you definately if you get stuck in your coding attempt anytime but before that you must know the basics of the language and must have dedicated some time and research on it.
Anyways, welcome to the coding hell.
PS: Long time no see Mr. Dave. Welcome back.
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734