04 2010 档案

摘要:std::endl 会调用 std::flush(), 这个操作在我的机器上平均 20 macros"\n" 不会调用std::flush(),这个操作在我的机器上平均 5 macros 而 close 操作也会调用flush ,所以最好尽可能的减少std::endl的调用 阅读全文
posted @ 2010-04-30 01:06 史莱姆 阅读(312) 评论(0) 推荐(0)
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#ifdef_MSC_VERBOOLWINAPIconsole_handler(DWORDcevent){switch(cevent){caseCTRL_C_EVENT:caseCTRL_BREAK_... 阅读全文
posted @ 2010-04-30 00:57 史莱姆 阅读(436) 评论(0) 推荐(0)
摘要:这个bug搞了我两天, 大致就是说select 函数在linux 下 每次调用都会重置timeout参数值, 所以需要在每次调用select 函数之前, 重新设置timeout (window下面不会重置timeout)。-----------------------------------------------------------------------------------------... 阅读全文
posted @ 2010-04-01 23:45 史莱姆 阅读(478) 评论(0) 推荐(0)