boost shared ptr


1. 使用智能指针的例子。
//z 2014-10-29 14:34:09 L.63 '33951 BG57IV3@XCL T892754998 .K.F2002403129[T9,L298,R11,V257]

#include <vector>
#include <iostream>

#include <boost/foreach.hpp>
#include <boost/shared_ptr.hpp>

void testSharedPtr()
{
    boost::shared_ptr< vector<double> > sharedPtrd(new vector<double>(100));
    BOOST_FOREACH(double& x, *sharedPtrd) x = 3.3;
    double fSum = 0.0;
    BOOST_FOREACH(double x, *sharedPtrd) fSum += x;
    cout << fSum << endl;
}


2. 使用 directx 2008 august 时,x64,输出汉字(中文字体) 倾斜样式,在特定的字号时调用DrawTextLine有bug,程序会崩溃。

posted @ 2014-10-29 14:53  BiG5  阅读(110)  评论(0编辑  收藏  举报