|
-
September 28th, 2007, 12:25 AM
#1
fstream problem
Hey,
I have the following code
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,
-
September 28th, 2007, 03:42 AM
#2
Re: fstream problem
What do you mean by "drop a file"?
Regards,
Paul McKenzie
-
September 28th, 2007, 05:34 AM
#3
Re: fstream problem
Like, pick up the a file (click and hold) then drop it onto it...
Like one might do to open a txt file with notepad...
BageDevimo,
-
September 28th, 2007, 06:03 AM
#4
Re: fstream problem
 Originally Posted by BageDevimo
Like, pick up the a file (click and hold) then drop it onto it...
Like one might do to open a txt file with notepad...
BageDevimo,
Please post your question in the Windows API forum, as this is dependent on the OS (Windows), and title your post differently. This has absolutely nothing to do with fstream, but it has to do with the Windows API and the GUI.
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|