/******************************************************************** @file main.cpp@date 2017-5-26 09:45:32@aut Hor Zoro_tiger@brief Problem 1032:c Language Programming Tutorial (third Edition) after class exercise 8.6http://www.dotcpp.com/oj/problem1032.html********************************************************************/#include<cstdio>#include<cmath>#include<string>#include<iostream>#defineTEST#undefTESTstd::stringAddString (ConstSTD::string& Left_str,ConstSTD::string&right_str) { returnLeft_str +right_str;}intMainintargcConst Char*argv[]) {#ifdef TEST freopen ("In.txt","R", stdin); Freopen ("OUT.txt","W", stdout);#endifstd::stringLeft_str ="", Right_str =""; while(Std::cin >> left_str >>right_str) {printf ("%s\n", AddString (Left_str, Right_str). C_STR ()); } return 0;}
Question 1032:c Language Programming tutorial (third Edition) after class exercise 8.6