Modify .txt to .cpp and add comments