change to g++
change to auto_ptr