I am learning basic C++, and right now I have gotten a string from a user and I want to check if they typed the entire file name (including .txt) or not. I have the string,
Using boost ends_with predicate:
#include if (boost::ends_with(fileName, ".txt")) { /* ... */ }