Gobelijn API documentation  - generated for commit a0cbea7
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
accum6.cpp
Go to the documentation of this file.
1 
7 #include "accum6.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  char name[] = "templates";
15  int length = sizeof(name) - 1;
16  std::cout << "the average value of the characters in \"" << name << "\" is "
17  << Accum<char>::accum(&name[0], &name[length]) / length << '\n';
18  return 0;
19 }
static AT::type accum(T const *beg, T const *end)
Definition: accum5.hpp:14
int main()
Definition: accum6.cpp:10