set the ios::nocreate flag when you try to open it. Like this (open a file for output, only if it doesn't exist):
file.open("filename", ios:: out|ios::nocreate);
edit: Ok, I'm a bonehead ... that's the exact opposite of what you want to do ... it succeeds only if the file already exists.
So, you can do it in two steps.
Attempt to open it with the nocreate flag. If that succeeds, you know the file exists, so close it and move on. If it fails, it likely means that the file doesn't exist, attempt to open it without the nocreate flag.
There is probably an easier way!