thanks your reply, it can compile now,
but its result did not run good
-------
root@eric-laptop:/home/eric/cppcookbook/ch13# ./a.out
terminate called after throwing an instance of 'std::runtime_error'
what(): locale::facet::_S_create_c_locale name not valid
Aborted
root@eric-laptop:/home/eric/cppcookbook/ch13#
-------------
original program is from 13-4.cpp of book (c++ cookbook, page 472, 473)
http://examples.oreilly.com/9780596007614/
you can download and read and test/run by yourself
the book authors expect the run result should be
3/28/2005
28.03.2005
or today's date
hope you can commit to port this vc++ code to gcc/g++, thanks a lot in advance, Eric