반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- GIT
- matplotlib
- list
- c#
- Java
- Apache
- PostgreSQL
- SQL
- PANDAS
- Github
- Redshift
- Google Excel
- Mac
- hive
- dataframe
- google apps script
- Tkinter
- 파이썬
- string
- gas
- django
- array
- math
- Kotlin
- Python
- Excel
- numpy
- PySpark
- Google Spreadsheet
Archives
- Today
- Total
목록const (1)
달나라 노트
C++ : const (상수값 설정, 재할당 불가능한 변수 선언)
변수를 선언할 때 맨 앞에 const 키워드를 붙이면 이 변수는 절대 재할당이 불가능한 변수로 생성됩니다. #include using namespace std; int main() { const int test_int = 10; return 0; } 위 예시를 보면 test_int라는 변수를 선언 후 10이라는 값을 할당하고 있습니다. 근데 const라는 키워드가 붙어있습니다. 이렇게 생성된 test_int 변수는 이후 코드의 어떤 부분에서 test_int = 20;과 같이 다른 값을 재할당할 수 없습니다. 재할당하려면 에러가 발생합니다.
C++
2022. 3. 23. 00:54