change .c to .cpp to avoid compile error