今天实验一下TR1的shared_ptr的使用,结果在gcc4.1上怎么也编译不过去,上网查了一下,还下载了TR1的手册。终于明白了,要在#include中加入
#include <tr1/memory>

c++标准扩展TR1#include <iostream>
c++标准扩展TR1#include 
<string>
c++标准扩展TR1#include 
<tr1/array>
c++标准扩展TR1#include 
<tr1/memory>
c++标准扩展TR1
using namespace std;
c++标准扩展TR1
using std::tr1::shared_ptr;
c++标准扩展TR1
c++标准扩展TR1
class Widget


这个文件。呵呵,可能是自己太不小心了!
这次C++要扩展的部分,根据TR1的说明主要有:

  • Reference Wrappers
  • Shared_ptr
  • result_of
  • mem_fn
  • Function Object Binders
  • Polymorphic Function Wrappers
  • Type Traits
  • Random Numbers
  • Tuples
  • Array
  • Hash Functions
  • Regular Expressions
  • Complex Number Algorithms

这些部分,我们看到了期待以久的正则表达式也在这里面哦!

相关文章:

  • 2021-05-16
  • 2021-12-18
  • 2022-12-23
  • 2021-06-30
  • 2022-12-23
  • 2021-12-15
  • 2022-01-31
  • 2021-10-04
猜你喜欢
  • 2021-12-10
  • 2021-07-03
  • 2021-04-08
  • 2022-12-23
  • 2021-12-06
  • 2021-08-10
  • 2021-10-07
相关资源
相似解决方案