std::cout

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2020 Jun 21 9:13
Editor
Edited
Edited
2023 Apr 25 16:31

Character out

print without
C Conversion Specifier
  • cout.setf(ios::fixed) (set format)
    • ios::dec: sets the basefield format to decimal (base 10).
    • ios::hex: sets the basefield format to hexadecimal (base 16).
    • ios::oct: sets the basefield format to octal (base 8).
    • ios::fixed: sets the floatfield format to fixed-point notation.
    • ios::scientific: sets the floatfield format to scientific notation.
    • ios::left: sets the adjustfield format to left alignment.
    • ios::right: sets the adjustfield format to right alignment.
    • ios::internal: sets the adjustfield format to internal alignment.
    • ios::showpos: displays the plus sign for positive numbers.
    • ios::showbase: displays the base prefix for non-decimal numbers.
    • ios::uppercase: displays the uppercase letters for hexadecimal numbers and the exponent in scientific notation.
  • cout.precision(2);
    • 소수점 자리
 
 
 
 
cout.put() - stdout 1 char
 
 
 
 

Recommendations