ホームに戻る
デバグ用テンプレ
// 1行
cout << a << endl;
cout << a << " " << b << endl;
cout << a << " " << b << " " << c << " " << endl;
cout << a << " " << b << " " << c << " " << d << " " << endl;
// 1次元配列
for(int i = 0; i < v.size(); i++){
cout << v[i] << " ";
if(i == (v.size() - 1))cout << endl;
}
// 2次元配列
for(int y = 0; y < v.size(); y++){
for(int x = 0; x < v[0].size(); x++){
cout << v[y][x] << " ";
}
cout << endl;
}
// イテレーター
set<int>::iterator itr = se.begin();
while(itr != se.end()){
cout << *itr << " ";
itr++;
}
cout << endl;