// A3.cpp - convert numeric type to string representation #include #include using namespace std; ////// start of complete answer ///////////////////// template string convert(T &t) { ostringstream temp; temp << t; return temp.str(); } ////// end of complete answer /////////////////////// void main() { int first = 3; cout << "\n 1st number is " << convert(first).c_str(); double second = 3.1415927; cout << "\n 2nd number is " << convert(second).c_str(); cout << "\n\n"; }