How to link input text file to C++ program

I'm trying to write a C++ program in CLion that opens, manipulates, and closes an input file and output file. The input file is a .txt file, but when I execute the program, it can't find the input file even though it's in the same directory as the .cpp program it's executing from. I was wondering if it was because I had to link the input file with CMake, but I'm unfortunately unfamiliar with configuring CMake. How can I link a .txt file to a C++ project?