Given a string, find the first integer inside and return its value as an integer. Return 0 if there is no integer inside.

Complete the following file:

prog.cpp

#include <cctype> #include <iostream> #include <sstream> #include <string> using namespace std; int string_to_int(string s) { istringstream strm; strm.str(s); int n = 0; strm >> n; return n; } int first_integer(string s) {
}