cpp file not opening correctly.

When I try to open the cpp source in Visual Studio, it just opens a blank notepad window. The cpp file says its 4 kb and there was code in it. Has anyone had this happen before and is there a way I can fix this or is the code lost forever?
locate the file in windows explorer, right-click and select 'edit'. what happens then?
It opens an empty text file. I know I saved it but while it was still opened on my computer, I just held the power button to turn my computer off. Could that have messed it up? I've done it a few times before though and had no problem.
The OS usually buffers file data so it might not be written to the hard drive until a few seconds later. This is normally nothing you will ever notice because the OS hides it well, but if you turn off the computer without the OS having any chance to shut down normally then data could be lost.
Last edited on
The same thing happened to me too, 6-7 months ago. Lost the entire project.
I guess it's back to square one then.
Topic archived. No new replies allowed.