일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- 알고리즘
- string
- predictive analysis
- pointer
- baekjoon
- 포인터
- pass by reference
- 백준
- 반복문
- function
- 오블완
- OOP
- Python
- vscode
- 문자열
- 함수
- 배열
- programming
- assignment operator
- Pre-processing
- Deep Learning
- array
- Class
- 티스토리챌린지
- raw data
- Data Science
- const
- 파이썬
- C++
- Object Oriented Programming
- Today
- Total
목록array (3)
Channi Studies

Data StructureA data structure is a way of organizing, storing, and performing operations on data.Some of the operations that can be performed on a data structure include accessing or updating data, searching for specific data, inserting new data, and removing data. In our post, we will take on data structures while focusing on the array and linked list. These basic data structures form many abs..
배열과 포인터의 관계: Relationship Between Arrays and Pointers 배열과 포인터를 둘 다 얼추 이해하게 되면, 한가지 공통점을 알게 됩니다. 배열의 이름이 어떤 것을 의미하는지 기억하고 계시나요? 바로 '배열의 첫번째 데이터의 주소값'을 나타냅니다. 그리고, 포인터 변수의 값은 주소값이였습니다. 이렇게 보면 사실상 배열의 이름과 포인터는 동일한 것 같지 않나요? 실제로 만약 포인터가 배열의 요소와 동일한 타입을 가지고 있다면, 포인터와 배열은 상호교환적으로, (사실상) 동일하게 사용할 수 있습니다. 간단한 코드로 이를 확인해 보겠습니다. int scores[]{100, 90, 80}; cout

Modern C++에서는 주로 배열보다는 벡터를 사용합니다. 배열에는 여러가지 특징이 존재합니다. 대표적인 특징 여러가지를 소개해드리겠습니다. 1. 배열의 모든 요소들은 같은 데이터 타입이여야 합니다. int my_arr[] {30, 50, 'a', "Ricky"}// 🚫🚫🚫 오류 발생 int my_arr[] {30, 50, 100, 300000}// Good char my_arr[] {'a', 'c', 'q' ,'h'}// Good 2. 배열의 크기는 고정되어 있습니다. (배열의 요소의 총 숫자는 선언 이후 변화할 수 없습니다.) 그에 반해, 벡터는 크기가 가변적입니다. 3. Array 사용 중 인덱스 초과에 대한 검사가 존재하지 않습니다. 즉, array의 크기를 3으로 선언하고 3 이상의 index..