visual studio 读取命令行指定文件,该如何解决

visual studio 读取命令行指定文件
最近转到visual studio 写C++, 真的是windows折腾不了linux环境啊,可是我碰到了问题。
我想在程序中读取命令行的参数指定的文件,具体如下:
#include<iostream>
using std::cout;
using std::cin;
using std::endl;
#include<string>
using std::string;
#include<fstream>
using std::ifstream;

// a class with call operator
class lenTest 
{
private:
int minLen;
int maxLen;
public:
// construct with two int paramaters
lenTest(int a, int b) : minLen(a), maxLen(b) {}
// call function to test if the lenth of string match
bool operator()(const string& str) const;

};

bool lenTest::operator()(const string& str) const
{
return str.size() >= minLen && str.size() <= maxLen;
}

int main(int argc, char** argv) 
{
lenTest test(1, 9); // callable object
string myString;
int count = 0;
ifstream input(argv[1]), endFile;
while (input >> myString) 
{
if (test(myString)) { ++count; }
}
cout << "The input file has " << count << " match the test condition." << endl;
return 0;
}

在上图代码中的34行,想让input绑定命令行参数指定的文件作为文件流,但是运行时,好像把命令行参数指定指定文件读入,当作代码运行出错。
错误如下(visual studio 2015):
引用
Severity Code Description Project File Line
Error C2146 syntax error: missing ';' before identifier 'world' Exercise14.38 c:\users\smarter\desktop\project\exercise14.38\exercise14.38\a.txt 1
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Exercise14.38 c:\users\smarter\desktop\project\exercise14.38\exercise14.38\a.txt 1


我是在cpp文件那里右键>>属性,填入a.txt,具体如下: 上传不了图片。
------解决思路----------------------
 项目、属性、配置属性、调试、命令参数:填写命令行参数。