Using the Template III What about this: int main() { vector v; v.push_back("1"); v.push_back("10"); v.push_back("5"); cout << sum(v) << endl; }