<legend id='ua0Ec'><style id='ua0Ec'><dir id='ua0Ec'><q id='ua0Ec'></q></dir></style></legend>
  • <small id='ua0Ec'></small><noframes id='ua0Ec'>

    <tfoot id='ua0Ec'></tfoot>

    1. <i id='ua0Ec'><tr id='ua0Ec'><dt id='ua0Ec'><q id='ua0Ec'><span id='ua0Ec'><b id='ua0Ec'><form id='ua0Ec'><ins id='ua0Ec'></ins><ul id='ua0Ec'></ul><sub id='ua0Ec'></sub></form><legend id='ua0Ec'></legend><bdo id='ua0Ec'><pre id='ua0Ec'><center id='ua0Ec'></center></pre></bdo></b><th id='ua0Ec'></th></span></q></dt></tr></i><div id='ua0Ec'><tfoot id='ua0Ec'></tfoot><dl id='ua0Ec'><fieldset id='ua0Ec'></fieldset></dl></div>

          <bdo id='ua0Ec'></bdo><ul id='ua0Ec'></ul>
      1. 命名空间 std 中没有名为 stoi 的成员

        No Member named stoi in namespace std(命名空间 std 中没有名为 stoi 的成员)

        <small id='0R62g'></small><noframes id='0R62g'>

          <tbody id='0R62g'></tbody>
        <legend id='0R62g'><style id='0R62g'><dir id='0R62g'><q id='0R62g'></q></dir></style></legend>
          <i id='0R62g'><tr id='0R62g'><dt id='0R62g'><q id='0R62g'><span id='0R62g'><b id='0R62g'><form id='0R62g'><ins id='0R62g'></ins><ul id='0R62g'></ul><sub id='0R62g'></sub></form><legend id='0R62g'></legend><bdo id='0R62g'><pre id='0R62g'><center id='0R62g'></center></pre></bdo></b><th id='0R62g'></th></span></q></dt></tr></i><div id='0R62g'><tfoot id='0R62g'></tfoot><dl id='0R62g'><fieldset id='0R62g'></fieldset></dl></div>

            <bdo id='0R62g'></bdo><ul id='0R62g'></ul>

                1. <tfoot id='0R62g'></tfoot>
                  本文介绍了命名空间 std 中没有名为 stoi 的成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在测试以下链接中的 std::stoi 函数:http://en.cppreference.com/w/cpp/string/basic_string/stol
                  但我得到了错误:

                  <块引用>

                  命名空间 std 中没有名为 stoi 的成员.

                  我该怎么办?请指教谢谢.

                  P.S:我使用 Xcode Ide 来做我的 C++.

                  #include #include <字符串>int main() {std::string 测试 = "45";int myint = std::stoi(test);std::cout <<myint <<'
                  ';}

                  图片

                  解决方案

                  首先,你需要一个支持 C++11 的编译器,并且需要在C++11 模式"下进行编译(在某些情况下).

                  其次,如果这实际上是 intellisense 问题(看起来可能是),那么可能只是您的 IDE 尚不支持 C++11.>

                  I am testing out std::stoi function found in the link below: http://en.cppreference.com/w/cpp/string/basic_string/stol
                  but I got the error:

                  No Member named stoi in namespace std.

                  What should I do? Please advise thanks.

                  P.S: I am using Xcode Ide to do my c++.

                  #include <iostream>
                  #include <string>
                  
                  int main()  {
                     std::string test = "45";
                     int myint = std::stoi(test);
                     std::cout << myint << '
                  ';
                  }
                  

                  Image

                  解决方案

                  First of all, you need a compiler that supports C++11 and you need to compile in "C++11 mode" (in some cases).

                  Secondly, if this is in fact an intellisense issue (and it looks like it may be), then it could simply be that your IDE doesn't support C++11 yet.

                  这篇关于命名空间 std 中没有名为 stoi 的成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Unable to access non-const member functions of objects in C++ std::set(无法访问 C++ std::set 中对象的非常量成员函数)
                  Constructing std::function argument from lambda(从 lambda 构造 std::function 参数)
                  STL BigInt class implementation(STL BigInt 类实现)
                  Sync is unreliable using std::atomic and std::condition_variable(使用 std::atomic 和 std::condition_variable 同步不可靠)
                  Move list element to the end in STL(在 STL 中将列表元素移动到末尾)
                  Why is overloading operatoramp;() prohibited for classes stored in STL containers?(为什么禁止对存储在 STL 容器中的类重载 operatoramp;()?)
                  <i id='dUmyS'><tr id='dUmyS'><dt id='dUmyS'><q id='dUmyS'><span id='dUmyS'><b id='dUmyS'><form id='dUmyS'><ins id='dUmyS'></ins><ul id='dUmyS'></ul><sub id='dUmyS'></sub></form><legend id='dUmyS'></legend><bdo id='dUmyS'><pre id='dUmyS'><center id='dUmyS'></center></pre></bdo></b><th id='dUmyS'></th></span></q></dt></tr></i><div id='dUmyS'><tfoot id='dUmyS'></tfoot><dl id='dUmyS'><fieldset id='dUmyS'></fieldset></dl></div>
                  <tfoot id='dUmyS'></tfoot>
                  <legend id='dUmyS'><style id='dUmyS'><dir id='dUmyS'><q id='dUmyS'></q></dir></style></legend>

                    <tbody id='dUmyS'></tbody>

                      • <small id='dUmyS'></small><noframes id='dUmyS'>

                            <bdo id='dUmyS'></bdo><ul id='dUmyS'></ul>