我是C ++的新手,我当前要解决的任务是将一个目录中* .txt文件中的某些数据解析到另一目录中的* + 1.txt文件中。我使用了代码示例:
#include <iostream>
#include <fstream>
#include <string>
#include <stdio.h>
int main(int argc, char*argv[]){
std::ifstream input("C:\\Tmp\\example.txt");
std::string outfilepass = "";
outfilepass +=argv[2];
outfilepass +="\\";
outfilepass += argv[1];
std::ofstream outfile(outfilepass);
return 0;
}
如果我编译然后使用sample.exe example1.txt“ C:\ Tmp \ NewFolder \”在Windows 10中一切正常,但在Windows 7中什么也没有发生。
!更新
我已经找到了一些有用的链接,这些链接可以帮助我找到解决方案。问题出在该应用程序的目标平台中。 (我用过VS 2019)。以下是一些有用的链接:
Visual Studio 2015 Change target platform to windows 7
我是C ++的新手,我当前要解决的任务是将一个目录中* .txt文件中的某些数据解析到另一目录中的* + 1.txt文件中。我使用了代码示例:#include&...
我已经找到了一些有用的链接,这些链接可以帮助我找到解决方案。问题出在该应用程序的目标平台中。 (我用过VS 2019)。以下是一些有用的链接: