有一段能够在Linux下运行的代码,复制到Windows&VS2017
包含文件chartheader0.txt的Tools文件夹复制到了项目目录里。
编译时
```void printChartHeader(char* from, FILE * to)
{
FILE * fp = fopen(from, "r");
int ch;
if (fp != NULL) {
while ((ch = fgetc(fp)) != EOF) fputc(ch, to);
fclose(fp);
}
}
...
printChartHeader("./Tools/chartheader0.txt", pCHART0);
//error C2664: “void printChartHeader(char *,FILE *)”: 无法将参数 1 从“const char [25]”转换为“char *”