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?
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.