/*
练习6.33:
编写一个递归函数,输出vector对象的内容。
*/
#include "TouWenJian_6.h"
void cout_DiGui(vector<string>::iterator beg, vector<string>::iterator end)
{
// if(beg++!=end-1)
// cout_DiGui(beg, end);
// cout<<*(beg-1)<<endl;
// if(beg!=end--)
// cout_DiGui(beg, end);
// cout<<*(end+1)<<endl;
if(beg!=end)
{
cout<<*beg<<endl;
cout_DiGui(++beg, end);
}
}
int main(int argc, char *argv[])
{
// for(int i=1;i<argc;++i)
// cout<<argv[i]<<endl;
vector<string> v_str;
string str;
while(cin>>str)
v_str.push_back(str);
cout_DiGui(v_str.begin(), v_str.end());
return 0;
}