• Announcements

Archived

This topic is now archived and is closed to further replies.

HELP vc++ ate my project

Recommended Posts

Kilj    122
I Have been working a few weeks on a project, I had started a new map class. On one run, the program froze, when I opened the project again it said that my map map.cpp file was binary and could not be read. I looked at the file and my code has been replaced with some garbage. It still works, but I cant change anything cause I just cant read the code. Id like to know if vc++ 6.0 saves backup files, if it does is this on by default? where does it save them? or how do i enable this? and why did this happen? In the past vc++ has just destroyed entire files, like deleted them from my hd. Its just so frustrating to work on something for a while, only to have all thrown away. Help please.

Share on other sites
jeeky    126
Well, sounds like you are screwed.

Interesting problem, though. I have never had dev studio destroy my work. Usually, I accidentally destroy it myself.

To prevent this problem in the future, I suggest you use some sort of version control. By making manual backups (Or use CVS or something) and numbering them, you will then have backups of your code as well as something to fall back on when your most recent development makes your code worse instead of better.

Share on other sites
Kilj    122
well im screwed again. Ill have to get into that habit. It isnt always vc++, I know aleast one time(not this time) I screwed something up crashed and when i restarted my hd caught it as an error or corrupt file... and ate it. bitter memory, damn hd, didnt even ask permission.

but thanks man.

Share on other sites
__ALex_J_    122
Lets hope the code you lost wasn''t:

#include <stdio.h>intmain(void){	FILE *f;	int i;	f = fopen("map.cpp", "wb");	for (i=0; i<256; i++)		fputc(i, f);	fclose(f);	return 0;}

I hate when I do an error of this kind. You think about something else and use the name of a source file in the code.