C++primer习题4.9

#include <string>
#include <iostream>
#include<vector>
using namespace std;

int main()
{
  vector<int> a(10,0);
  for (size_t i = 0; i < a.size(); ++i)
  {
    a[i] = i+1;
  }
}

posted @ 2011-06-10 20:14  hailong  阅读(181)  评论(0编辑  收藏  举报