Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) std::noshowpos

 

std::noshowpos is a stream modifier to not prepend positive values by a plus.

 

#include <iostream>

int main()
{
  const int i = 1;
  std::cout
    << std::showpos   << i << '\n'
    << std::noshowpos << i << '\n';
}

 

Screen output:

 

+1
1

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict