Whenever I write this code, I hear it is supposed to create a file with my message in it, but Xcode does not create it. I searched my whole computer and could not find the file. (I have a mac) Hear is the code:
#include <iostream>
#include <fstream>
using namespace std;
int main(){
ofstream myFile("thisfile.txt");
myFile << "This is my message";
myFile.close();
}
So basically whenever I run this, it just doesn't create "thisfile.txt."
You can easily access that from Xcode by right clicking on the item below product file on the left hand side which is a preview of all the files then "Show in finder"
Spotlight doesn't search Library and also its a hidden file
if you want to be able to see it use this command
defaults write com.apple.Finder AppleShowAllFiles YES
in the terminal and relaunch finder
to undo that use this command
defaults write com.apple.Finder AppleShowAllFiles NO
and again relaunch finder