迭代器的使用

#include "stdafx.h"
#include 
#include 
#include 
#include 

int _tmain(int argc, _TCHAR* argv[])
{
	std::vector vec;
	vec.push_back(3);
	vec.push_back(4);
	vec.push_back(5);
	vec.push_back(6);

	for (std::vector::iterator iter = vec.begin(); iter != vec.end(); ++iter)

	{
		std::cout << *iter;
	}


	return 0;
}

你可能感兴趣的:(C++)