move some c config

Signed-off-by: coldnew <coldnew.tw@gmail.com>
move some c++ code

Signed-off-by: coldnew <coldnew.tw@gmail.com>