
C++
文章平均质量分 60
mmiooi
这个作者很懒,什么都没留下…
展开
-
fstream使用小结
fstream类是C++文件流的定义,可以ifstream对象,也可以定义ofstream对象。本例说明:文件打开、读写文件、文件结束符识别、文件指针移动的方法原创 2011-05-19 16:47:00 · 557 阅读 · 0 评论 -
关于const常量的地址经过const_cast转换之后,发生了什么
示例代码如下:#includeusing namespace std;int main(){ const int i=0; int *j=const_cast(&i); (*j)=15; cout<<"*j=="<<*j<<endl; cout<<"const int i=="<<i<<endl; cout<<"const int is address:"<原创 2011-06-06 16:27:00 · 593 阅读 · 2 评论 -
用static成员对象实现单例模式
利用类中静态成员对象的初始化方法,将类的构造函数声明为私有的,在类A中放置一个类A的静态成员对象a,可以通过类访问这个静态对象a,不能创建新的A的实例原创 2011-08-08 12:16:21 · 394 阅读 · 0 评论 -
boost_1_47_0的安装以及fadora15下Eclipse中的配置
<!--@page {margin:2cm}p {margin-bottom:0.21cm}h1 {margin-bottom:0.21cm}h1.western {font-family:"Liberation Sans",sans-serif;原创 2011-08-09 21:24:21 · 812 阅读 · 0 评论