X1215: Does file exist? in C++

Write a function called file_exists that receives the name of a file as a string and determines whether or not that file exists, based on if an fstream can open it for reading.

If the file can be opened, return true but if not, return false

Your Answer:

Reset

Practice a different C++ exercise

Feedback

Your feedback will appear here when you check your answer.