For C++ to be able to read your input file, it should be exactly in the same folder that contains your C++ execuatble, which is the cmake-build-debug folder in the floder that contains your project. You can choose to create the file directly in this folder, but this process can get complicated (especially on a Mac). So, we have this guide to creating files through CLion. Easy way to create input files 1. On Clion, expand the Project file in the Project Explorer. The Project Exploer is the window on the left hand side of the screen. Expand the project by clicking on the little arrow to the left of the project name. 2. Right click on the project name and choose New -> File (Just File, not any other kind of file). A window will pop up where you can specify the name of the file. 3. The file will open in CLion. Write/ Copy-Paste the information for the input file. 4. On Finder (on a Mac) or in the search pane (Windows), look for "CLion Projects". Open the folder that pops up and locate the folder for your project. 5. The file will be in the folder for the project. The folder will also contain a folder called "cmake-build-debug". Move the file into that folder. 6. You C++ program can now read the file. 7. An output file created by the program will also be in the same folder. You can open it and take a look after your program has run. You can also move it out into the project folder and open it in CLion to take a look. The second option is recommended because in Windows, opening the file in Notepad would make it look like the endl's on your program didn't work.