Skip to content

Latest commit

 

History

History
48 lines (27 loc) · 1.16 KB

File metadata and controls

48 lines (27 loc) · 1.16 KB

 

 

 

 

 

 

std::internal is a stream manipulator to let padding spaces of a negative number be put between the minus and its digits.

 


#include <iomanip> #include <iostream> int main () {   const int x = -12;   std::cout     << std::setw(4)  << std::internal << x << '\n'     << std::setw(4)  << std::left     << x << '\n'     << std::setw(4)  << std::right    << x << '\n'; }

 

Screen output:

 


- 12 -12   -12