looks fine to me but what do you mean by "I need 2 files should be taken from argv"?
I mean, at the moment you print all arg values so you should have them.
Does anything get printed out?
Can you actually step through the code?
how to do you actually run this? what's the command line look like before you press enter to run?
Don't use exit, and don't use system. And remove the return on line 33: It's better just to return 0 on line 36. if you want to "pause", see here: http://www.cplusplus.com/forum/beginner/1988/