--- id: cpp-variables-identifiers title: "C++ Identifiers" category: "Programming_Language" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["variable naming rules", "C++ μ‹λ³„μž"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.83 created_at: 2026-07-04 updated_at: 2026-07-04 review_reason: "" merge_history: [] tags: ["cpp", "programming-language", "w3schools", "variables", "naming"] raw_sources: ["https://www.w3schools.com/cpp/cpp_variables_identifiers.asp"] applied_in: [] github_commit: "" --- # [[CPP Identifiers]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) The naming rules here are IDENTICAL to C's variable-naming chapter word-for-word (letters/digits/underscores, must start with letter or underscore, case-sensitive, no reserved words) β€” confirming that C++'s identifier grammar is inherited directly from C rather than redesigned, which is exactly what the Intro chapter's "almost the same syntax" claim predicted in concrete terms. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **Identifier** β€” the unique name given to a variable. [S1] - **Naming rules** β€” letters, digits, underscores allowed; must start with a letter or underscore; case-sensitive (`myVar` β‰  `myvar`); no whitespace/special characters; reserved keywords (like `int`) cannot be used as names. [S1] - **Descriptive naming recommended** β€” `minutesPerHour` over `m`, for readability, even though both compile. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) - Descriptive vs terse naming: `int minutesPerHour = 60; // Good` versus `int m = 60; // OK, but unclear`. [S1] ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) - ν˜„μž¬κΉŒμ§€ 발견된 λͺ¨μˆœ 사항 μ—†μŒ (No contradictions found in available sources). C 챕터와 κ·œμΉ™μ΄ 동일함이 확인됨. ## πŸ› οΈ 적용 사둀 (Applied in summary) ν˜„μž¬ 발견된 μ‹€μ œ 적용 사둀가 μ—†μŠ΅λ‹ˆλ‹€ β€” Cμ—μ„œ 배운 μ‹λ³„μž κ·œμΉ™μ΄ C++둜 κ·ΈλŒ€λ‘œ μ΄μ–΄μ§„λ‹€λŠ” 점이 μ–Έμ–΄ μ „ν™˜ ν•™μŠ΅μžμ—κ²Œ μœ λ¦¬ν•œ 지점이닀. [S1] ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Descriptive vs. terse variable naming (C++): ```cpp // Good int minutesPerHour = 60; // OK, but not so easy to understand what m actually is int m = 60; ``` ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference, not a primary standards body) - **μ‹ λ’° 점수:** 0.83 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[C++ Tutorial]] - **κ΄€λ ¨ κ°œλ…:** [[CPP Variables]], [[CPP Variables Constants]], [[C Variables Names]] - **μ°Έμ‘° λ§₯락:** μ‹λ³„μž κ·œμΉ™ β€” μƒμˆ˜(Variables Constants) μ±•ν„°λ‘œ 이어짐. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” C++ Identifiers β€” https://www.w3schools.com/cpp/cpp_variables_identifiers.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-07-04: Initial draft synthesized from the W3Schools "C++ Identifiers" page (Astra wiki-curation, P-Reinforce v3.1 format).