update to base.c
Added cpp example and change C file to C++