---
id: cpp-data-types-bool
title: "C++ Boolean Data Types"
category: "Programming_Language"
status: "draft"
verification_status: "conceptual"
canonical_id: ""
aliases: ["bool keyword", "C++ 불리언 타입"]
duplicate_of: ""
source_trust_level: "B"
confidence_score: 0.85
created_at: 2026-07-04
updated_at: 2026-07-04
review_reason: ""
merge_history: []
tags: ["cpp", "programming-language", "w3schools", "data-types", "bool"]
raw_sources: ["https://www.w3schools.com/cpp/cpp_data_types_bool.asp"]
applied_in: []
github_commit: ""
---

# [[CPP Boolean Data Types]]

## 🎯 한 줄 통찰 (One-line insight)
`bool` needs no special header include in C++ — it's a native keyword usable immediately — a direct contrast to C, where the equivalent chapter required explicitly including `<stdbool.h>` (a C99 addition) before `bool` could be used at all, reinforcing the Data Types chapter's observation that C++ treats booleans as first-class from the start. [S1]

## 🧠 핵심 개념 (Core concepts)
- **`bool`** — a native C++ keyword (no header needed); represents `true` or `false`. [S1]
- **Underlying integer representation when printed** — `cout << boolVar;` shows `1` for true, `0` for false, same convention as C. [S1]
- **Primary use** — conditional testing (covered in a later chapter). [S1]

## 📖 세부 내용 (Details)
- Declaring and printing booleans: `bool isCodingFun = true; bool isFishTasty = false; cout << isCodingFun; // 1 cout << isFishTasty; // 0`. [S1]

## ⚖️ 모순 및 업데이트 (Contradictions & updates)
- **bool 사용에 별도 헤더가 필요 없음**: C에서는 <stdbool.h>를 반드시 포함해야 bool을 쓸 수 있었지만, C++에서는 그런 요구사항이 언급되지 않아 네이티브 키워드로 즉시 사용 가능함이 확인됨. [S1]

## 🛠️ 적용 사례 (Applied in summary)
현재 발견된 실제 적용 사례가 없습니다 — 불리언 값이 조건 테스트에 주로 쓰인다는 점이 이후 조건문(Conditions) 섹션의 기초가 된다. [S1]

## 💻 코드 패턴 (Code patterns)
Boolean values printing as their underlying integer representation (C++):
```cpp
bool isCodingFun = true;
bool isFishTasty = false;
cout << isCodingFun;  // Outputs 1 (true)
cout << isFishTasty;  // Outputs 0 (false)
```

## ✅ 검증 상태 및 신뢰도
- **상태:** draft
- **검증 단계:** conceptual
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
- **신뢰 점수:** 0.85
- **중복 검사 결과:** 신규 생성 (New discovery)

## 🔗 지식 그래프 (Knowledge Graph)
- **상위/루트:** [[C++ Tutorial]]
- **관련 개념:** [[CPP Data Types Numeric]], [[CPP Data Types Char]], [[C Booleans]]
- **참조 맥락:** 불리언 타입 — 문자 타입(Data Types Char) 챕터로 이어짐.

## 📚 출처 (Sources)
- [S1] W3Schools — C++ Boolean Data Types — https://www.w3schools.com/cpp/cpp_data_types_bool.asp

## 📝 변경 이력 (Change history)
- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Boolean Data Types" page (Astra wiki-curation, P-Reinforce v3.1 format).
