Chinaunix首页 | 论坛 | 博客
  • 博客访问: 271396
  • 博文数量: 55
  • 博客积分: 2030
  • 博客等级: 大尉
  • 技术积分: 737
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-13 18:06
文章分类

全部博文(55)

文章存档

2011年(2)

2010年(7)

2009年(17)

2008年(29)

我的朋友

分类: C/C++

2008-04-29 00:21:03

Many client errors can be prevented by the introduction of new types, such as

struct Day {
    explicit Day(int d)
    :val(d) {}
    
    int val;
}

Once the right types are in place, it can sometimes be reasonable to restrict the values of those types.

reliable initialization of non-local static objects can be problematic

have your types behave consistently with the built-in types

"cross-DLL" problem: when an object is created using new in one DLL but is deleted in a different DLL
阅读(934) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:Qt常用例程

给主人留下些什么吧!~~