   Overwriting files
  Hey, I'm just about finished with a console craps game, and I have an issue with saving files. See, I prompt the user to enter the filename, and then it is saved in the game's directory. But I can't figure out how to compare the new entered filename to one saved in the directory, in which I can use to ask the user if he/she wants to overwrite. Any suggestions?   
  What programming language are you using and what operating system does your program run on?   ;  Oops sorry. I was just assuming everyone was using c++, and I am using Windows XP. I'd post some code, but I don't want to get chewed out again for not knowing how to format it.   ;  C++ and Windows XP   ;  I would use the functions in  boost::filesystem to determine if the file exists. Alternately you can use Windows API functions like FindFirstFile().edit: A third option is to open the file as an std::ifstream first. If the ifstream() opens the file, the file exists.   ;  You can use CreateFile with CREATE_NEW in the dwCreationDisposition parameter and see if it fails.[edit] Using ifstream is actually a good idea. If you ever want to compile to a different platform, you will have less problems this way.jfl.   ;  Alright, that looks promising. Thanks, I'll try that out.   