txt file to automatically open (if this is possible)? txt files to automatically save in the working directory the rest of the project is saved in and in this case for the.
txt file in the same project file that contains my source code which is a step closer to the solution I want. MyFile=fopen("/Users/craigmcallister/Documents/CodeBlocks/First_Text/first.txt","w") I read on another similar question that if I give it a direct path it will work and it has, to some extent MyFile=fopen("first.txt","w") // open first.txt for writing (or create it if it doesn't exist) - this will be in the same folder as the c program Project: Opening a Text File for Writting txt file.Īutomatic Control and Systems Engineering126 - Problem Sheet 2.Q2 I am creating projects using the following steps > File > New > Project > Console Application > Then naming the Project and saving it to a File I have created for all my programmes.Īll my previous projects are saved in neat folders in this directory except the. txt file it doesn't appear in the directory with the source code and other files, I have found it in the All My File folder in Finder. I am using Code::Blocks 12.11 on Mac, I have got Xcode and downloaded the command line packages so everything seems to be doing what I want it to. I am learning C programming so I'm a total beginner.