Monday, May 09, 2011

Re: [Cpp-Programming] file copy program with arguments taken in main function

Hello Surya,

If you do not mention an output file name using the option '-o' then
the default output file 'a.out' is created. But you can mention the
output file name using '-o' immediately followed by the name, which in
this case, was 'filecopy'. So you can then run the program using the
command:

./filecopy

Now, you are expecting 2 input files to be given to the main. So those
two file names are to be provided. If the files are not in the same
directory as the program, you can always give the full path, like,

./filecopy file1.txt /home/minhaz/Desktop/file2.txt

Hope it helps.

Thanks.

--
Mohammad Minhazul Alam
Lecturer, Dept. of CSE & IT, UITS

--
You received this message because you are subscribed to the Google Groups "C++ Programming" group.
To post to this group, send email to cpp-programming@googlegroups.com.
To unsubscribe from this group, send email to cpp-programming+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cpp-programming?hl=en.

0 Comments:

Post a Comment

<< Home