upgrade CodesEntry.cpp using main.cpp style(c-style)