I am learning C programming so I'm a total beginner.
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.
My problem is when I open a .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 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.
All my previous projects are saved in neat folders in this directory except the .txt file.
This is my code.
/**
ACS126 - Problem Sheet 2.Q2
Project: Opening a Text File for Writting
Author: Craig McAllister
Date: 23.02.17
**/
#include <stdio.h>
main()
{
FILE *myFile;
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
fprintf(myFile,"Hello World!!!\n");
fclose(myFile);
}