Is it possible to read infinity or NaN values using input streams?

后端 未结 6 1011
北荒
北荒 2021-01-01 08:45

I have some input to be read by a input filestream (for example):

-365.269511 -0.356123 -Inf 0.000000

When I use std::ifstream mystream;

6条回答
  •  隐瞒了意图╮
    2021-01-01 09:26

    You will have to write a custom extraction function, since your specific implementation clearly does not handle them correctly.

提交回复
热议问题