Hey,
I have the following code
When I compile it, it compiles fine.Code:#include <iostream> #include <fstream> using namespace std; int main(int argc, char *argv[]) { ofstream logWrite("CompileLog.log"); for(int i=1; i<argc ;i++ ) { logWrite << argv[i] << endl; cout << argv[i] << endl; system("pause"); logWrite.close(); } }
If I start it using CMD "ArgumentTester.exe Hello" it writes to CompileLog.log file.
But, when I drop a file onto it eg "test.txt" it doesn't write. Doesn't anyone know why..?
BageDevimo,




Reply With Quote