Where to find data files created on code blocks?

I created a program that allows you to write to a data file as well as read from it. I know it works because i wrote to it and then read from it and the information i entered appeared. My problem is that i thought when a file is created through c++, the file will be created in the same directory as the program, but the new file is no where to be seen. it obviously exists somewhere in the system, but i can't find it. where could it be, if not in the location where i saved my project? using code blocks and a mac.

try the root directory of your HDD
If you're using an IDE to run your program the location of output files are determined by how the IDE is configured. With many of the current IDEs the output files are placed in the same directory where the project files are located, but you can configure the IDE to place the files in other directories if you so desire. You can also open the file with a complete path to place the file in a desired directory.

When running the program from the command line a file opened without path information will be created in the same directory as the program.

yes, thats why i am confused. i didn't change any of the settings, so the file should come out in the same directory of the project, should it not? only when i go to the directory, the file isn't there. when i run the program it pulls the information from that file, but i can't find the file itself.
i didn't change any of the settings, so the file should come out in the same directory of the project, should it not?

Your IDE may differ, so the best bet is to use your Operating systems find functionality to locate the file.

Topic archived. No new replies allowed.