#include <iostream> #include <sstream> #include <string> using namespace std; string answer( string question); int main() { ostringstream os; os << answer( "How are you? "); os << ", "; os << answer( "Sure? "); cout << os.str() << endl; return 0; } string answer( string question) { cout << question; string s; getline(cin,s); return s; }