Get precision of cout

后端 未结 2 1300
情话喂你
情话喂你 2021-01-14 17:33

I can set precision of cout output using

cout.precision(precision_value);

how can I get the precision value, which i

2条回答
  •  臣服心动
    2021-01-14 18:05

    With the function precision().

    int main() {
      std::cout << std::cout.precision() << std::endl;
      return 0;
    }
    

提交回复
热议问题