SweetDream
高歌一壶新酿酒,醉抱青山不必归。

文章分类 -  C++

The IEEE standard for floating point arithmetic(转)
摘要:The IEEE standard for floating point arithmetic The IEEE (Institute of Electrical and Electronics Engineers) has produced a standard for floating point arithmetic. This standard specifies how single p... 阅读全文
posted @ 2008-10-10 20:10 SweetDream 阅读(421) 评论(0) 推荐(0)
常量指针和指针常量
摘要:char * const cp; ( * 读成 pointer to ) cp is a const pointer to char ,亦即指针常量,cp值(cp指向的地址)不可改变,但*cp,也就是cp所指对象能够改变。 const char * p; char const * p; p is a pointer to const char,亦即指向常量的指针,所以... 阅读全文
posted @ 2006-03-15 10:58 SweetDream 阅读(423) 评论(0) 推荐(0)
C++语法 模板 (转)
摘要:因为使用模板可以使程序员建立具有通用类型的函数库和类库。模板也是C++语言支持参数化多态性的工具。 函数模板 函数模板能以同样的程序代码对不同类型的数据进行处理,其关键是将所处理的数据类型说明为参数,即类型参数化。 定义函数模板的一般形式是: template 函数返回值类型 函数名(形参表){ 函数体} 说明: (1)这里的类型参数名就是代表形形色色数据类型的通用参数名,它可以... 阅读全文
posted @ 2006-03-10 22:55 SweetDream 阅读(2241) 评论(0) 推荐(1)
Smart Pointers What , Why , Which(转)
摘要:What are they? Smart pointers are objects that look and feel like pointers, but are smarter. What does this mean? To look and feel like pointers, smart pointers need to have the same interface tha... 阅读全文
posted @ 2006-01-08 12:34 SweetDream 阅读(273) 评论(0) 推荐(0)