[quote]What is wrong? I’d prefer to keep version with auto_ptr instead of working with raw pointers if possible.[/quote]The I/O for auto_ptr is supported only in the trunk with revision 36548 and up.
11:44:~>"root"
*******************************************
* *
* W E L C O M E to R O O T *
* *
* Version 5.28/00 14 December 2010 *
* *
* You are welcome to visit our Web site *
* http://root.cern.ch *
* *
*******************************************
ROOT 5.28/00 (trunk@37585, Dec 14 2010, 15:20:27 on linuxx8664gcc)
CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] std::auto_ptr<int> a(new int(8))
Error: Symbol auto_ptr is not defined in current scope (tmpfile):1:
Error: Symbol int is not defined in current scope (tmpfile):1:
(const int)0
*** Interpreter error recovered ***
root [1]