BageDevimo
September 28th, 2007, 12:25 AM
Hey,
I have the following 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();
}
}
When I compile it, it compiles fine.
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,
I have the following 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();
}
}
When I compile it, it compiles fine.
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,