C++ で「error: 'vector' was not declared in this scope」のエラー対処方法
C++ で「error: 'vector' was not declared in this scope」というエラーが発生した場合の対処について解説しています。
■エラー内容
error: 'vector' was not declared in this scope|
■対処方法
・「include <iostream>」としている場合は「include <bits/stdc++.h>」に変更する。
・「using namespace std;」とコードに記述する。