#include
#include
#include
using namespace std;
int main()
{
list list1;
size_t n = 10;
double val = 3.14;
list list2(n, val);
list list3(list2);
cout << "Size of list1 " << list1.size() << endl;
cout << "Size of list2 " << list2.size() << endl;
cout << "Size of list3 " << list3.size() << endl;
// populate a new list with the elements of list2
list list4;
list::const_iterator i;
for (i = list2.begin(); i != list2.end(); ++i)
{
list4.push_back(*i);
}
// Print every character in the list
for (i = list4.begin(); i != list4.end(); ++i)
{
cout << *i << ",";
}
cout << endl;
return 0;
}