Unable to open 'free_base.cpp': Unable to read file 'c:\Program Files\Microsoft VS Code\minkernel\crts\ucrt\src\appcrt\heap\free_base.cpp'

问题

vscode编写C++程序,使用microsoft C++

Unable to open ‘cvt.cpp‘: Unable to read file ‘c:\Program Files\Microsoft VS Code\minkernel\crts\ucrt\src\appcrt\convert\cvt.cpp‘ (Error: Unable to resolve non-existing file ‘c:\Program Files\Microsoft VS Code\minkernel\crts\ucrt\src\appcrt\convert\cvt.cpp‘).
Unable to open ‘free_base.cpp‘: Unable to read file ‘c:\Program Files\Microsoft VS Code\minkernel\crts\ucrt\src\appcrt\heap\free_base.cpp‘ (Error: Unable to resolve non-existing file ‘c:\Program Files\Microsoft VS Code\minkernel\crts\ucrt\src\appcrt\heap\free_base.cpp‘).

原因

为了使用一些老的函数在virtual studio上面运行

使用了#define _CRT_SECURE_NO_WARNINGS

Unable to open 'free_base.cpp': Unable to read file 'c:\Program Files\Microsoft VS Code\minkernel\crts\ucrt\src\appcrt\heap\free_base.cpp'

这个在vscode上面会出现问题,点击继续运行依然可以跑完程序。

解决方法

删除这一行。

Unable to open 'free_base.cpp': Unable to read file 'c:\Program Files\Microsoft VS Code\minkernel\crts\ucrt\src\appcrt\heap\free_base.cpp'

以上都是胡扯的

        int * index = new int(NumTrnPats);

Unable to open 'free_base.cpp': Unable to read file 'c:\Program Files\Microsoft VS Code\minkernel\crts\ucrt\src\appcrt\heap\free_base.cpp'
内存不够?那么换成double,float?

        double* index = new double(NumTrnPats);
        float * index = new float(NumTrnPats);

原来是智障了。不要熬夜写程序,尤其是C++的指针或者复杂的新东西。因为你已经是头猪了。现在已经3:47了。

    int * index = new int[NumTrnPats];

白扔2小时,同时扔了以前的代码结构。原本还想试试新写法。

define _CRT_SECURE_NO_WARNINGS不影响vscode编译运行C++

Unable to open 'free_base.cpp': Unable to read file 'c:\Program Files\Microsoft VS Code\minkernel\crts\ucrt\src\appcrt\heap\free_base.cpp'

Unable to open 'free_base.cpp': Unable to read file 'c:\Program Files\Microsoft VS Code\minkernel\crts\ucrt\src\appcrt\heap\free_base.cpp'

上一篇:魔趣 android10 编译x86-64 运行模拟器


下一篇:Android监听焦点的改变