使用Code :: Blocks

时间:2018-04-10 21:48:16

标签: c++ codeblocks mingw-w64

我使用Code :: Blocks 12.11中的c ++编译器在我的Windows 8机器上安装了MinGW-w64。

我尝试使用其中一个转换函数编译程序,并收到以下错误消息:

  

main.cpp | 22 |错误:' stoi'不是' std' |的成员

我在编译器设置和工具链可执行文件中设置了目录。我不确定该程序为什么不编译。欢迎任何帮助。

int main()
{
    int num1;
    int num2;
    int* pNum = &num2;
    string strTest = "6";

    cout << strTest << endl;

    std::cout << std::stoi("32") << std::endl;


    num1 = 3;
    *pNum = 5;

    cout << "Finished" << endl;
    return 0;
}

0 个答案:

没有答案
相关问题