use vector
add some codes writen in cpp