Where is shared_ptr?

前端 未结 4 968
甜味超标
甜味超标 2020-11-29 19:56

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 s

4条回答
  •  迷失自我
    2020-11-29 20:48

    for VS2008 with feature pack update, shared_ptr can be found under namespace std::tr1.

    std::tr1::shared_ptr MyIntSmartPtr = new int;
    

    of

    if you had boost installation path (for example @ C:\Program Files\Boost\boost_1_40_0) added to your IDE settings:

    #include 
    

提交回复
热议问题