![]() |
#2
yuccn2011-05-11 23:39
|

#include <iostream>
#include <vector>
#include <list>
using namespace std;
int main()
{
vector<int> ivec(10, 3);
list<double> ilist(ivec.begin(), ivec.end());
typedef list<double>::const_iterator type;
for (type in=ilist.begin(); in!=ilist.end(); ++in)
{
cout << *in << ' ';
}
cout << endl;
return 0;
}
#include <vector>
#include <list>
using namespace std;
int main()
{
vector<int> ivec(10, 3);
list<double> ilist(ivec.begin(), ivec.end());
typedef list<double>::const_iterator type;
for (type in=ilist.begin(); in!=ilist.end(); ++in)
{
cout << *in << ' ';
}
cout << endl;
return 0;
}