Retro Of Alexkid

여러 이야기
 by 알렉스키드
2023. 8. 30. 13:21 개발/C++
C++ include

#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/

 

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 "" 사용자 라이브러리 사용

 

'개발 > C++' 카테고리의 다른 글

C++ 캐스트 연산자  (0) 2023.09.15
C++ 비트 연산  (0) 2023.09.14
C++ 네임스페이스  (0) 2023.08.29



Total / Today / Yesterday
Image by ポカポカ色
Tag by Passion
Designed by Ritz