Create commonfunc.cpp