#include<iostream>
#include<iterator>
#include<list>
using namespace std;
int main()
{
list <double>ar;
list<double> :: iterator it;
ar.push_back(12);
ar.push_back(23);
ar.push_back(78);
ar.push_front(50);
ar.push_front(41);
ar.push_back(40);
for(it = ar.begin();it != ar.end(); it++)
{
cout << *it << "\t";
}
cout << endl;
return 0;
}
#include<iterator>
#include<list>
using namespace std;
int main()
{
list <double>ar;
list<double> :: iterator it;
ar.push_back(12);
ar.push_back(23);
ar.push_back(78);
ar.push_front(50);
ar.push_front(41);
ar.push_back(40);
for(it = ar.begin();it != ar.end(); it++)
{
cout << *it << "\t";
}
cout << endl;
return 0;
}
Comments
Post a Comment