08 2012 档案

摘要:实体为一个文字,DXF信息如下(-1 . <图元名: 7ffff32e4d0>)(0 . "TEXT")(5 . "2A6D")(102 . "{ACAD_REACTORS")(330 . <图元名: 7ffff32e4e0>)(102 . "}")(330 . <图元名: 7ffffbbd9f0>)(100 . "AcDbEntity")(67 . 0)(410 . "Model")(8 . "... 阅读全文
posted @ 2012-08-31 10:11 胖胖熊 阅读(328) 评论(0) 推荐(0) 编辑
摘要:不要小看长度截断警告,虽然它不会造成运行上的问题,却会给调试带来大麻烦.例如1>V:\WorkBench\Boost\boost/multi_index/ordered_index.hpp(566): warning C4503: “boost::foreach_detail_::and_”: 超出修饰名的长度,名称被截断1>V:\WorkBench\Boost\boost/multi_index... 阅读全文
posted @ 2012-08-25 15:51 胖胖熊 阅读(1182) 评论(0) 推荐(0) 编辑
摘要:#include "stdafx.h"#include <iostream>#include <list>typedef std::pair<int, int> IntPair;typedef std::list<IntPair> LstIntPair;inline std::ostream& operator << (std::ostream& stream, IntPair& val){str... 阅读全文
posted @ 2012-08-24 12:38 胖胖熊 阅读(426) 评论(0) 推荐(0) 编辑
摘要:出现重载的时候,Bind无法推导出正确的重载类型,需要显示的指定,实例代码如下:BOOL CJDTDrawer::Draw(){const CJDTGraph& gphJDT = GetGphJDT();CJDTGraph::ConstItSetVertex itVtxJDT;for ( itVtxJDT = gphJDT.vtxBegin(); itVtxJDT != gphJDT.vtxEnd... 阅读全文
posted @ 2012-08-24 10:03 胖胖熊 阅读(1255) 评论(0) 推荐(0) 编辑
摘要:近日发现开发的一个程序有个指针被重复删除了,跟踪检查后发现是虚函数不够‘虚’导致重复删除造成的。请看实例代码#include"stdafx.h"#include<iostream>classBase{public:Base(){fun();}virtual~Base(){fun();}virtualvoidfun(){std::cout<<"Base::fun"<<std::endl;}};classSub:publicBase{public:Sub(){fun();}~Sub(){fun();}virtualvoid 阅读全文
posted @ 2012-08-20 15:23 胖胖熊 阅读(165) 评论(0) 推荐(0) 编辑
摘要:IntArray arrTest;arrTest.append(1);arrTest.append(1);arrTest.append(1);arrTest.append(1);arrTest.append(1);arrTest.append(1);IntArray other;arrayForeachT(arrTest, BD<int>(&IntArray::append, BST::ref(other), _1)); // OKarrayForeachT(arrTest, BD<int>(&IntArray::append, &other, 阅读全文
posted @ 2012-08-20 15:05 胖胖熊 阅读(189) 评论(0) 推荐(0) 编辑