First, and foremost, get rid of Dev-C++, it's no good. Even the better versions, Orwell and wxDev, I feel are severely lacking. As I understand, Orwells hasn't been updated for sometime again, and wxDev has been running into issues with their releases.
Secondly, there could be an issue with the compiler supplied, depending on the age of it. However, I couldn't even begin to guess why since you're using updated iostream and fstream headers. My guess is that something may have broken during installation.
If you're dead set on using Dev-C++, please try uninstalling it, restarting your computer, redownloading it, and reinstalling. If the issue persists, it could be due to an issue in your environment itself, I'd attempt a thorough virus scanning.
If you're not picky on your IDE, which you really shouldn't be since you probably haven't really learned how to use it yet, I'd suggest switching to something a little more up to date. I personally suggest Code::Blocks as do others on the forum. That and Microsoft Visual C++ are the most popular. MSVC++ has known issues and it hinders itself so that is why I suggest C::B. I'll provide a link below for all OS's, just find the link to Windows mingw-setup
and download that. Install it and attempt to run your code again. If you still are having issues, it is directly related to your system and not the compiler or the IDE.