convert to cpp
convert to cpp