[an error occurred while processing this directive] [an error occurred while processing this directive]

STL

std::vector

なにはともあれvector。
#include 

int main(void){
  vector<int> v;
  v.push_back(3);
  v.push_back(2);
  v.push_back(1);
  v[0] = 10;
  return 0;
}
二次元配列は、vectorのvectorとすることで使えます。
  vector< vector<int> > HOGE(4, vector<int>(4));

std::map

キーには何でも使えます。これはstringがキーで値がstringの例。
#include <string>
#include <map>
#include <iostream>

int main(){
  std::map<string,string> members;

  members["ab"] = "kei";
  members["cd"] = "rei";
  members["efg"] = "may";
  members["xxy"] = "yu";
  members["zzo"] = "lee";
  std::map<string,string>::iterator it;

  for(it = members.begin(); it != members.end(); it++){
    std::cout << it->first << " : ";
    std::cout << it->second << endl;
  }
  return 0; 
}
[an error occurred while processing this directive]