我试图将argv保存为矢量作为字符串,但我不断收到错误: see reference to function template instantiation 'std::vector<_Ty>::vector<_TCHAR*[]>(_Iter,_Iter)' being compiled
我已经尝试将argv保存到矢量或字符串,但它不起作用
我正在使用Microsoft Visual Studio 2010.
这是我的代码:
#include "stdafx.h"
#include <string>
#include <vector>
#include <iostream>
int _tmain(int argc, _TCHAR* argv[])
{
std::vector<std::string> allArgs(argv + 1, argv + argc);
return 0;
}
Run Code Online (Sandbox Code Playgroud)