Well Im new to C++ and I am using "bloodShed Dev C++" as my compiler. I would like to write to a text file "C:\anser.txt" but the I cant get the code I was given to work

Could someone please tell me how to write to a text file? )