ostringstream problem with int in c++

后端 未结 4 1817
我寻月下人不归
我寻月下人不归 2021-01-19 14:33

I would expect the following code to output hello5. Instead, it only outputs hello. It seems to be a problem with trying to output an int to the

4条回答
  •  轮回少年
    2021-01-19 14:52

    Your code is correct, it writes hello5 on my Windows 7 machine. Maybe the problem is rather that you don't write a std::endl or something which might confuse your OS.

提交回复
热议问题