be solved

since stl list have no definition of operation[]

use for_each instead