Enter the code in the cpp file that was just created. You can get the code shown below click here.
You will notice an asterisk in front of the file name on the tab in the Editor view, this tells you the file changed but has not been saved.