(C++) std::showpos
January 11, 2018 · View on GitHub
(C++) std::showpos
std::showpos is a stream modifier to 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