![]() |
#2
peach54602013-08-02 06:21
|

#include <iostream>
#include <map>
#include <iterator>
using namespace std;
int main()
{
typedef map<int,string> map_test;
typedef pair<int,string> pair_test;
typedef ostream_iterator <pair> ostream_itr;
map_test te1;
pair_test p1(1,"ti");
for(int i=0;i<5;i++)
te1.insert(p1);
copy(te1.begin(),te1.end(),ostream_itr(cout,"\n"));
return 0;
}
求大神帮忙