02 2013 档案

摘要:1 /* 表存储结构 */ 2 // 或者: template <class Type> class DuLinkList; 3 template <class Type> 4 class DuLNode 5 { 6 // 当授予对给定模版的所有实例的访问权的时候, 7 // 在作用域中不需要存在该模版或函数模版的声明。 8 // 实质上,编译器将友元声明也当作类或函数的声明对待。 9 template <class Type> friend class DuLinkList;10 // 或者: friend class DuLinkList<Type 阅读全文
posted @ 2013-02-24 15:30 SubmarineX 阅读(247) 评论(0) 推荐(0)
摘要:fstream::binary开启:新行采用‘LF’,作为一个字节;关闭:新行采用‘CR’‘LF’组合,作为一个字节。关于‘CR’‘LF’,参见:http://en.wikipedia.org/wiki/Newline以下是《C++ Primer》第四版中的一段代码: 1 int main() 2 { 3 fstream fInOut("copyOut", fstream::ate | fstream::in | fstream::out | fstream::binary); 4 if (!fInOut) 5 { 6 cerr << "Un... 阅读全文
posted @ 2013-02-21 15:58 SubmarineX 阅读(409) 评论(0) 推荐(0)