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

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

        <legend id='0EAlA'><style id='0EAlA'><dir id='0EAlA'><q id='0EAlA'></q></dir></style></legend>

        shared_ptr 在哪里?

        Where is shared_ptr?(shared_ptr 在哪里?)

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

          <legend id='EwTMM'><style id='EwTMM'><dir id='EwTMM'><q id='EwTMM'></q></dir></style></legend>
            <bdo id='EwTMM'></bdo><ul id='EwTMM'></ul>
            1. <tfoot id='EwTMM'></tfoot>
              • <small id='EwTMM'></small><noframes id='EwTMM'>

                    <tbody id='EwTMM'></tbody>

                  本文介绍了shared_ptr 在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  经过几个小时试图找到 shared_ptr 的位置后,我现在非常沮丧.我看到的示例都没有显示完整的代码以包含 shared_ptr (和工作)的标题.简单地说明 stdtr1 根本没有帮助!我已经下载了提升,但仍然没有出现!有人能帮我确切地告诉我在哪里可以找到它吗?

                  I am so frustrated right now after several hours trying to find where shared_ptr is located. None of the examples I see show complete code to include the headers for shared_ptr (and working). Simply stating std, tr1 and <memory> is not helping at all! I have downloaded boosts and all but still it doesn't show up! Can someone help me by telling exactly where to find it?

                  谢谢你让我发泄我的不满!

                  Thanks for letting me vent my frustrations!

                  我看到我的标题已更改.对于那个很抱歉.所以...也是因为我不清楚 shared_ptr 是C++ 版本依赖"--> 这就是为什么我没有说明我的环境--> 因此可能是为什么我很难找到它.

                  I see my title has been changed. Sorry about that. So... it was also because it was not clear to me that shared_ptr is "C++ version dependant" --> that's why I did not state my environment --> therefore probably why it was so difficult for me to find it.

                  我正在研究 MSVS2008.

                  I am working on MSVS2008.

                  编辑 2:我不知道为什么,但是我在到处寻找 shared_ptr 的同时包括 [memory] 和 [boost/tr1/memory.hpp] 和 [boost/tr1/tr1/memory] ..当然,我不能.

                  EDIT 2: I don't know why, but I was including [memory] and [boost/tr1/memory.hpp] and [boost/tr1/tr1/memory] while looking everywhere for the shared_ptr.. of course, i couldn't.

                  感谢所有回复.

                  推荐答案

                  至少有三个地方可以找到shared_ptr:

                  There are at least three places where you may find shared_ptr:

                  1. 如果您的 C++ 实现支持 C++11(或至少 C++11 shared_ptr),则 std::shared_ptr 将在<内存>.

                  如果您的 C++ 实现支持 C++ TR1 库扩展,那么 std::tr1::shared_ptr 可能会在 (Microsoft VisualC++) 或 (g++ 的 libstdc++).Boost 还提供了一个可以使用的 TR1 实现.

                  If your C++ implementation supports the C++ TR1 library extensions, then std::tr1::shared_ptr will likely be in <memory> (Microsoft Visual C++) or <tr1/memory> (g++'s libstdc++). Boost also provides a TR1 implementation that you can use.

                  否则,您可以获取 Boost 库并使用 boost::shared_ptr,它可以在 中找到.

                  Otherwise, you can obtain the Boost libraries and use boost::shared_ptr, which can be found in <boost/shared_ptr.hpp>.

                  这篇关于shared_ptr 在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  How to print vector#39;s data(如何打印矢量的数据)
                  Visual C++ appends 0xCC (int3) bytes at the end of functions(Visual C++ 在函数末尾附加 0xCC (int3) 字节)
                  How to use a variable inside a _T wrapper?(如何在 _T 包装器中使用变量?)
                  MSVC++ warning flags(MSVC++ 警告标志)
                  How to read file which contains uxxxx in vc++(如何在vc++中读取包含uxxxx的文件)
                  stack overflow error in C++ program(C++程序中的堆栈溢出错误)
                      <tbody id='KxV6B'></tbody>
                    1. <tfoot id='KxV6B'></tfoot>

                        <legend id='KxV6B'><style id='KxV6B'><dir id='KxV6B'><q id='KxV6B'></q></dir></style></legend>
                      1. <small id='KxV6B'></small><noframes id='KxV6B'>

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

                        • <bdo id='KxV6B'></bdo><ul id='KxV6B'></ul>