Change to c-style array

change all vector to c-style array