⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 50-3.cpp

📁 effective stl 源代码 code
💻 CPP
字号:
//
// A third example from ESTL Item 50
//

#include <string>
#include <vector>
#include <iostream>
#include "ESTLUtil.h"
using namespace std;

class Widget {
public:
	//...
	int readStream(istream& stream);	// readStream takes
	//...								// its parameter by
};										// reference


int main()
{
	using namespace std;
	using namespace ESTLUtils;

	vector<Widget*> vw;


	for_each(										// most STL platforms
		vw.begin(), vw.end(),						// try to generate a
		bind2nd(mem_fun(&Widget::readStream), cin)	// reference to a
	);												// reference in this 
													// call; such code
													// won't compile
	
	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -