int main()
{
    std::vector<int> int_vec = {-1, 0, 1, 2, 3, 4, 5, 6, -6};
    int int_sum = sum_numbers(int_vec); // 14

    std::forward_list<double> double_vec = {1.0, 2.1, 3.3, 4.4, 5.5};
    double double_sum = sum_numbers(double_vec); // 16.3

    std::deque<unsigned int> unsigned_vec = {0, 2, 4, 6};
    unsigned int unsigned_sum = sum_numbers(unsigned_vec); // 12
}
Esempio n. 2
0
void ARR37(void) {
	int my_numbers[3] = { 1, 2, 3 };
	const int sum = sum_numbers(my_numbers, sizeof(my_numbers)
			/ sizeof(my_numbers[0]));
	printf("%d\n", sum);
}