std:: showpoint, std:: noshowpoint
|
헤더 파일에 정의됨
<ios>
|
||
|
std::
ios_base
&
showpoint
(
std::
ios_base
&
str
)
;
|
(1) | |
|
std::
ios_base
&
noshowpoint
(
std::
ios_base
&
str
)
;
|
(2) | |
부동 소수점 출력에서 소수점 문자를 무조건 포함할지 여부를 설정하거나 해제합니다. 입력에는 영향을 주지 않습니다.
showpoint
플래그를 비활성화합니다. 마치
str.
unsetf
(
std::
ios_base
::
showpoint
)
를 호출한 것처럼 동작합니다.
이것은 I/O 조정자이며, 다음과 같은 표현식으로 호출될 수 있습니다:
out
<<
std
::
showpoint
(여기서
out
는
std::basic_ostream
타입), 또는 다음과 같은 표현식으로 호출될 수 있습니다:
in
>>
std
::
showpoint
(여기서
in
는
std::basic_istream
타입).
소수점 문자로 사용할 문자는 출력 시점에 스트림에 임뷰드된 로캘의 numpunct 패싯에 의해 결정되며, 이는 std::num_put::put 에 설명된 바와 같습니다.
목차 |
매개변수
| str | - | I/O 스트림에 대한 참조 |
반환값
str (조작 후 스트림에 대한 참조).
예제
#include <iostream> int main() { std::cout << "1.0 with showpoint: " << std::showpoint << 1.0 << '\n' << "1.0 with noshowpoint: " << std::noshowpoint << 1.0 << '\n'; }
출력:
1.0 with showpoint: 1.00000 1.0 with noshowpoint: 1
참고 항목
|
지정된 ios_base 플래그를 지움
(함수) |
|
지정된
ios_base
플래그를 설정함
(함수) |