Cursor cpp problem

I can’t compile and run the C++ code I wrote through Cursor. Cursor displays the code in the chat screen and creates the file, but it doesn’t write the code into the file.