上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页

2013年3月26日

boost 程序库完全开发指南_ch3_memory_manager

摘要: ch3的代码块好像还真的不用编译,只需要把代码嵌入即可#include <iostream>#include <memory>#include <vector>using namespace std;#include <boost/smart_ptr.hpp> #include <boost/make_shared.hpp>#include <boost/enable_shared_from_this.hpp>using namespace boost; #if 0struct posix_file //一个示范性质的文件 阅读全文

posted @ 2013-03-26 20:18 Orz.. 阅读(261) 评论(0) 推荐(0)

2013年3月24日

auto_ptr的不足

摘要: 一开始还发现这货挺方便的.后来才发现还是不行,多引用时,就会重复删除了#include <iostream>#include <memory>using namespace std;void func(const auto_ptr<int>& pInt){ cout << *pInt<<endl;}class X{public: X(){cout <<"construct"<<endl;} ~ X(){cout <<"destructor"<&l 阅读全文

posted @ 2013-03-24 23:47 Orz.. 阅读(212) 评论(0) 推荐(0)

boost 程序库完全开发指南_date_time

摘要: 下面是看boost 程序库完全开发指南时,date_time(chapter2)时所敲下的代码片断....,不保证其正确性,仅作为一个记录....#include"stdafx.h"#include <vector>#include <string>#include <fstream>#include <windows.h>#include <boost/progress.hpp>#include <iostream>#include <algorithm>using namespace s 阅读全文

posted @ 2013-03-24 22:19 Orz.. 阅读(748) 评论(0) 推荐(0)

cl.exe 的include 及link路径命令行格式

摘要: 这两个vc中命令行的编译选项,仅作记录/LIBPATH:"f:\boost\stage\lib"/I "F:/boost" 阅读全文

posted @ 2013-03-24 17:25 Orz.. 阅读(731) 评论(0) 推荐(0)

boost test的测试环境

摘要: 试了一下boost 的测试框架,,发现还是可用的正常解开后,如果只是调用BOOST_AUTO_TEST_SUITE(test1)BOOST_AUTO_TEST_CASE(t_test2){ BOOST_CHECK_EQUAL(my_add(2,3), 5);}BOOST_AUTO_TEST_SUITE_END()这几部分好像还真的可以直接内嵌代码中去我把boost 的代码库的src 放进了f:\boost/*t1.cpp*/#define BOOST_TEST_MAIN #define BOOST_TEST_INCLUDED#include <boost/test/included/un 阅读全文

posted @ 2013-03-24 14:12 Orz.. 阅读(271) 评论(0) 推荐(0)

C++ 友元函数

摘要: #include <iostream>using namespace std;class Y;class X{ int _foo;public: X(int n):_foo(n){} void foobar(Y& y);};class Y{ friend class X; int _bar;public: Y(int n):_bar(n){}};void X::foobar(Y& y){ cout << y._bar << endl;} int main() { X x(3); Y y(4); x.foobar(y); return 0; } 阅读全文

posted @ 2013-03-24 08:56 Orz.. 阅读(137) 评论(0) 推荐(0)

2013年3月21日

AutoHotKey.ini

摘要: ; IMPORTANT INFO ABOUT GETTING STARTED: Lines that start with a; semicolon, such as this one, are comments. They are not executed.; This script has a special filename and path because it is automatically; launched when you run the program directly. Also, any text file whose; name ends in .ahk is a.. 阅读全文

posted @ 2013-03-21 09:36 Orz.. 阅读(556) 评论(0) 推荐(0)

2013年3月20日

.emacs

摘要: ;;start the emacs with the server mode;;(server-start);;close startup screen(tool-bar-mode -1)(menu-bar-mode -1)(setq inhibit-startup-message t)(setq initial-scratch-message "");;显示行号 (global-linum-mode 1);; (global-linum-mode 0);; (define-key key-translation-map [(meta v)] [(control v)])( 阅读全文

posted @ 2013-03-20 15:57 Orz.. 阅读(685) 评论(0) 推荐(0)

2013年2月21日

ATHK弄出个有道词典加入生词本的快接键...

摘要: (由于我平时查词一般都最大化,没用最小化的那个,所以位置还是比较固定比较好找)(本方法我个人使用..不保证在其它配置,其它版本上使用的正确性)无折腾,不快活..................有人说,程序员应该是懒惰的,,,,,,本人就是因为懒得用鼠标去点 有道词典中那个 "添加到生词本"那个小小的按钮(后来发现只是一个链接)而忙活了整整一个上午再搭上了下午一大段的时间,这个事情本来想得很简单,,,,,有道词典中....应该有这个快捷键吧,可惜翻遍了菜单,都没有.......看来,,懒点都不行,,,再次,我想着一下提一个意见,于是在反馈中加入了这个信息,希望有道词典在下一版 阅读全文

posted @ 2013-02-21 15:49 Orz.. 阅读(1606) 评论(1) 推荐(0)

2013年2月18日

原来MAC地址还是要购买的

摘要: 今天偶尔之间填写工单记录,发现居然有一个购买MAC地址一项.查了一下,发现IEEE为了保证MAC地址全球的唯一性, 还是作了一部分划分的,详见下面http://standards.ieee.org/develop/regauth/oui/public.html另外:http://cn.ieee.org/OUI_introduction.htmlOUI介绍Organizationally Unique Identifier(OUI) 被称作“组织唯一标识符”,在任何一块网卡中烧录的6字节MAC地址中,前三个字节就体现了OUI,通常情况下,该标识符是唯一的。因此,OUI可以用来创建MAC地址、蓝牙 阅读全文

posted @ 2013-02-18 09:52 Orz.. 阅读(2968) 评论(0) 推荐(1)

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页

导航