#include using namespace std; int main() { //outfile will point to the file I want to write to //but right now it points to nothing FILE * outfile; //outfile now points to "myfile.txt" //and the "w" says to open the file so that //I can write to it outfile = fopen("myfile.txt", "w"); //put "Hello World\n" into the file that outfile points to fputs("Hello World\n ", outfile); //close the file fclose(outfile); return 0; }