Gobelijn API documentation  - generated for commit a0cbea7
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
accum9.cpp
Go to the documentation of this file.
1 
7 #include "accum9.hpp"
8 #include <iostream>
9 
10 int main()
11 {
12  int num[] = {1, 2, 3, 4, 5};
13  std::cout << "the average value of the integer values is " << Accum<int>::accum(&num[0], &num[5]) / 5 << '\n';
14 
15  char name[] = "templates";
16  int length = sizeof(name) - 1;
17  std::cout << "the average value of the characters in \"" << name << "\" is "
18  << Accum<char>::accum(&name[0], &name[length]) / length << '\n';
19 
20  return 0;
21 }
static AT::type accum(T const *beg, T const *end)
Definition: accum5.hpp:14
int main()
Definition: accum9.cpp:10