Added cpp code. It works.