I've a problem with creation of C++ project made with CLion. My software should load and save user's profile by disk in order to don't lose own settings every time he opens the program. Obviously it shouldn't be a problem if I knew a pre-defined path for the .txt file but I need that my software always knows where this file stays. Does CLion let creating a sort of txt file that has been built with .cpp files? Is there the possibility of create an "internal memory" for the stand-alone program?
When I run it in CLion I set as "working directory" the project directory and so it knows where to find "data.txt" but when I run the compiled program from terminal (I work on Linux) it doesn't find data.txt. How can I make permanent the "working directory" also for the compiled project? Thank you very much.