浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Vector的初始化与遍历 - dtor - 博客园

 

std::vector<int> IntTest;

    
for (int i = 0; i < 10++i)
    {
        IntTest.push_back(i);
    }

    
for (std::vector<int>::iterator iter = IntTest.begin(); iter != IntTest.end(); ++iter)
    {
        std::cout 
<< *iter << std::endl;
    }
posted on 2013-03-12 01:08  lexus  阅读(336)  评论(0)    收藏  举报