Test Before Leaping
A call to open can be unsuccessful for a number of reason
Therefore you should always follow a call to open with a test to determine whether the call was successful
This is typically accomplished with a call to the member function fail:
The fail function takes no arguments and returns a bool value