#include
#include
#include
#include
using namespace std;
static const int ARRAY_SIZE = 5;
int main( ) {
list lstStr;
lstStr.push_back("A");
lstStr.push_back("B");
lstStr.push_back("C");
lstStr.push_back("D");
for (list::iterator p = lstStr.begin( );
p != lstStr.end( ); ++p) {
cout << *p << endl;
}
for (list::reverse_iterator p = lstStr.rbegin( );
p != lstStr.rend( ); ++p) {
cout << *p << endl;
}
}
/*
A
B
C
D
D
C
B
A
*/