小编ssp*_*spp的帖子

如何使用 x64 运行 cl?

我遇到了与这里相同的问题fatal error C1034: windows.h: no include path set

我输入vcvars32.bat并解决了我的问题,但我想链接一些 64 位 .lib 文件,当我这样做时:

cl main.cpp xxxlib.lib
Run Code Online (Sandbox Code Playgroud)

我得到:

warning LNK4272: library machine type 'x64' conflict with target machine type 'x86'
Run Code Online (Sandbox Code Playgroud)

是不是因为我用的vcvars32.bat是32位的?在哪里可以找到 64 位版本?

谢谢

c++ batch-file visual-c++ cl

6
推荐指数
1
解决办法
4958
查看次数

如何在C++中连接string + int + string?

如何连接i + name + letter + i?

for(int i = 0; i < 10; ++i){

    //I need a const char* to pass as a parameter to another function
    const char* name  = "mki";

    //The letter is equal to "A" for the first 2, "B" for the second 3,
    //"C" for the following 4 ...
    const char* final_string = ???
}
Run Code Online (Sandbox Code Playgroud)

我已经尝试过使用:

std::to_string(i)
Run Code Online (Sandbox Code Playgroud)

但我说错了

对于std,to_string未定义

我正在使用Visual C++.

c++ string char

-4
推荐指数
1
解决办法
95
查看次数

标签 统计

c++ ×2

batch-file ×1

char ×1

cl ×1

string ×1

visual-c++ ×1