单数怎么变复数啊?
//make_plural函数是将单词的单数变复数的,请问各位该怎么改这个程序啊?#include <iostream>
#include <string>
using namespace std;
int main()
{
string make_plural(string &);
string str;
cout<<make_plural("success")<<endl;
cout<<make_plural("failure")<<endl;
return 0;
}
string make_plural(string &str)
{
string str1;
str1=str+'s';
return str1;
}