#include <iostream> #include <vector> using namespace std; int main() { vector<int> exam; exam.push_back(10); exam.push_back(20); exam.push_back(30); // for문 끝에는 ; 붙이지 않는다 ㅇㅇ for (int i=0, size = exam.size(); i < size; i++) { cout << "벡터값 : " << exam.at(i) << endl; } return 0; }
백터 라이브러리 활용법
https://cplusplus.com/reference/vector/vector/
difference_typea signed integral type, identical to: iterator_traits ::difference_type usually the same as ptrdiff_t
cplusplus.com
#include <> 기본라이브러리 사용
#include "" 사용자 라이브러리 사용