I am using putty to write some of my C++ programs in. I locate my directory, and i made a file in my home directory named "name.txt". My name.txt file and my program (which is named "PuttyTest.cpp) are both in the same directory. However when I run this program below, then go to open up the name.txt file in Putty, nothing appears there. I am assuming my name.txt isn't in the right folder but I'm not sure which one it needs to be in.
1 2 3 4 5 6 7 8 9 10 11 12 13
#include <iostream>
#include <fstream>
usingnamespace std;
int main() {
ofstream myfile;
myfile.open("name.txt");
myfile << "Writing this to a file.\n";
myfile.close();
return 0;
}