How to read space separated numbers from console?

后端 未结 5 1757
无人共我
无人共我 2021-01-12 03:13

I\'m trying to do a simple task of reading space separated numbers from console into a vector, but I\'m not getting how to do this properly.

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-12 03:21

    Prompt user after each number or take number count in advance and loop accordingly. Not a great idea but i saw this in many applications.

提交回复
热议问题