07-6.cpp
来自「effective stl 源代码 code」· C++ 代码 · 共 22 行
CPP
22 行
//
// Sixth example from Item 7 (using Boost shared pointers)
//
#include <iostream>
#include <vector>
#include "ESTLUtil.h"
#include "Widget.h"
#include <boost/smart_ptr.hpp> // from Boost
using namespace std;
using namespace ESTLUtils;
int data[] = { -30, 102, 55, -19, 0, 222, -3000, 4000, 8, -2 };
const int numValues = sizeof data / sizeof(int);
const int SOME_MAGIC_NUMBER = 10;
void doSomething()
{
typedef boost::shared_ptr<Widget> SPW; // SPW =
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?