convert from c to c++

Signed-off-by: liuhuahang <liuhuahang@xiaomi.com>