docs(10_Wiki): 위키 구조 정리 — 언어 튜토리얼 카테고리 폴더 제거 + 신규 자산 동기화

Topic_CSS/Topic_HTML/Topic_JavaScript/Topic_Prompt/Topic_Comfyui 등 기존 카테고리 폴더를 정리하고,
Topic_Graphic/Dev 등 신규 산출물과 Topics 내부 세션/메모리 기록을 동기화.
This commit is contained in:
Antigravity Agent
2026-07-05 00:10:59 +09:00
parent a397bc4720
commit 1cfd3bbb56
1495 changed files with 68534 additions and 27 deletions
@@ -0,0 +1,64 @@
---
id: cpp-variables-constants
title: "C++ Constants"
category: "Programming_Language"
status: "draft"
verification_status: "conceptual"
canonical_id: ""
aliases: ["const keyword", "read-only variables", "C++ 상수"]
duplicate_of: ""
source_trust_level: "B"
confidence_score: 0.84
created_at: 2026-07-04
updated_at: 2026-07-04
review_reason: ""
merge_history: []
tags: ["cpp", "programming-language", "w3schools", "constants"]
raw_sources: ["https://www.w3schools.com/cpp/cpp_variables_constants.asp"]
applied_in: []
github_commit: ""
---
# [[CPP Constants]]
## 🎯 한 줄 통찰 (One-line insight)
Just like in C, `const` requires initialization at the MOMENT of declaration — declaring `const int minutesPerHour;` and assigning it a value on a later line is explicitly shown to fail — meaning C++ inherits C's exact same "declare-without-assign is illegal for const" restriction rather than relaxing it. [S1]
## 🧠 핵심 개념 (Core concepts)
- **`const` keyword** — declares a variable as unchangeable/read-only after initialization. [S1]
- **Mandatory initialization** — a `const` variable must receive its value at declaration time; assigning it later is a compile error. [S1]
- **Use case** — values unlikely to ever change (e.g. `minutesPerHour`). [S1]
## 📖 세부 내용 (Details)
- Attempting reassignment fails: `const int myNum = 15; myNum = 10; // error: assignment of read-only variable 'myNum'`. [S1]
- Declare-without-assign fails: `const int minutesPerHour; minutesPerHour = 60; // error`. [S1]
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
- **C와 동일한 const 초기화 규칙**: 선언과 동시에 값을 할당해야 하며, 나중에 대입하는 방식은 에러가 발생한다는 점이 C 챕터와 완전히 동일함이 확인됨. [S1]
## 🛠️ 적용 사례 (Applied in summary)
현재 발견된 실제 적용 사례가 없습니다 — 절대 변하지 않는 값(예: minutesPerHour = 60)을 const로 선언하는 것이 실전 코드의 표준 활용이다. [S1]
## 💻 코드 패턴 (Code patterns)
Declaring a constant that must be initialized at the point of declaration (C++):
```cpp
const int minutesPerHour = 60;
```
## ✅ 검증 상태 및 신뢰도
- **상태:** draft
- **검증 단계:** conceptual
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
- **신뢰 점수:** 0.84
- **중복 검사 결과:** 신규 생성 (New discovery)
## 🔗 지식 그래프 (Knowledge Graph)
- **상위/루트:** [[C++ Tutorial]]
- **관련 개념:** [[CPP Variables Identifiers]], [[CPP Variables Multiple]], [[C Constants]]
- **참조 맥락:** 상수 선언 — 여러 변수 한번에 선언하기(Variables Multiple) 챕터로 이어짐.
## 📚 출처 (Sources)
- [S1] W3Schools — C++ Constants — https://www.w3schools.com/cpp/cpp_variables_constants.asp
## 📝 변경 이력 (Change history)
- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Constants" page (Astra wiki-curation, P-Reinforce v3.1 format).