First commit
Change C code to C++ code