fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template<typename ElementType, typename ContainerType>
  5. ElementType findAverage(ContainerType& container)
  6. {
  7. for (auto i = container.begin(); i != container.end(); ++i)
  8. {
  9. cout << *i;
  10. }
  11. return 10;
  12. }
  13.  
  14. int main()
  15. {
  16. auto lst = { 1, 2, 3, 4, 5 };
  17. findAverage<int>(lst);
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
12345