Reputation: 143
I am trying to run this code in Code::Blocks to test my project:
FILE *tFile = fopen("findloc.txt", "w");
However, it puts the file in Users/Pon3 instead of Users/Pon3/Projects/MyProject which is where I want it to go. How can I fix this in Code::Blocks (Mac OS X Mountain Lion)?
Upvotes: 2
Views: 5929
Reputation: 967
"Users/pon3/Projects/MyProject/findloc.txt"
would put your text file more specifically were you want.
If you simply write FILE *tFile = fopen("findloc.txt", "w");
, your text file is going to be were code::block put his files.
Upvotes: 2