add .gitignore and modify NextDate from cpp to c