阅读背景:

在VS2010中使用auto关键字和lambda表达式

来源:互联网 

  先看一段使用了std::list的代码:

	std::list<int> array;
	for(int i = 0; i < 10; i++)
	{
		array.push_back(i);
	}

	for (std::list<int>::iterator it = array.begin(); it != array.end(); ++it)
	{
		(*it) += 1;
	}

	for (std::list<int>::iterator it = array.begin(); it != array.end(); ++it)
	{
		printf("%d\t", *it);
	}
	std::list<int> ar



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: