命令行参数怎么写啊,这个错误找了好久也解决不了

#include
#include
#include
#include
using namespace std;

int _tmain(int argc, TCHAR* argv[])
{

    TCHAR * srcfile = NULL;
    TCHAR * tgtfile = NULL;
    ifstream src;
    ofstream tgt;
    string sd;
    for(int i = 1;i < argc; ++i)
    {
        cout<<"abc";
        if(_tcscmp(argv[i], _T("-src"))==0) 
            {
                srcfile = argv[++i];
                cout<<"Source File Locate Sucessfully\n";
            }
        if(_tcscmp(argv[i], _T("-tgt"))==0)
            {
                tgtfile = argv[++i];
                cout<<"Target File Locate Sucessfully\n";
            }
        continue;
    }
    src.open(srcfile,ios::in);
    tgt.open(tgtfile,ios::out);
    if(!src)
        cout<<"srcfile empty\n";
    while(getline(src,sd))
    {
        tgt<<sd<<endl;
    }
    src.close();
    tgt.close();
    return 0;
}
![图片说明](https://img-ask.csdn.net/upload/201501/08/1420730932_772428.png)
求大神指点迷境,解惑啊,小弟感激不尽

文件名中有空格么?

src.open(srcfile,ios::in);
tgt.open(tgtfile,ios::out);

在这里下断点调试下

/#include "stdafx.h"
/#include
/#include
/#include
/#include
头文件

错误::::::::::::::::::::::::::::::::::::::::::::::::::::

Microsoft Visual C++ Runtime Library

Debug Assertion Failed!

Program: E:\Vitual 2012\parameter\Debug\parameter.exe
File: f:\dd\vctools\crt_bld\self_x86\crt\src\fopen.c
Line: 54

Expression: (file != NULL)

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)


中止(A) 重试(R) 忽略(I)

点中止,用编译器调试

要么是没有权限,要么是srcfile文件名不完整,你调试下。