Exit code 11 is not anything specific to the C++ standard. However, on Linux that code is generally used to represent a segmentation fault. Off the top of my head, I don't see anything glaringly wrong other than the fact that you never close the file after you write to it.