wut is your ide btw?
visual studio, qt creator, codeblcocks (etc)
anyways I am at school and I dont have my programming companion (qt creator) with me put fire this up and tell me if it works. this will support a CL interface, so make a new "console C++ application".. from here it is very easy to port it to a GUI with an inputbox and button
visual studio, qt creator, codeblcocks (etc)
anyways I am at school and I dont have my programming companion (qt creator) with me put fire this up and tell me if it works. this will support a CL interface, so make a new "console C++ application".. from here it is very easy to port it to a GUI with an inputbox and button
Code:
#include <iostream>
#include <fstream>
using namespace std;
int main () {
ofstream myfile;
int filename;
cout << "Please enter a text file name: ";
cin >> filename;
cout << "text file " << filename;
myfile.open (filename);
myfile << "Writing this to a file.\n";
myfile.close();
return 0;
}
slowly getting better