[C++] bool 출력
Updated:
예제
- 코드
-
#include <iostream> using namespace std; int main() { cout << true << endl; cout << false << endl; cout << "------ 1" << endl; cout << boolalpha; cout << true << endl; cout << false << endl; cout << "------ 2" << endl; cout << noboolalpha; cout << true << endl; cout << false << endl; return 0; }
-
- 실행 결과
-
1 0 ------ 1 true false ------ 2 1 0
-