I have the following that will open a file for reading. However, I want to check to make sure that the file was open successfully, so I am using the fail to see if the flags
Your error is because you are using ios::fail() as a static method when it is actually a member method.
ios::fail()
if (input_stream.fail()) { ... }