Stringstream extract integer

后端 未结 4 501
小鲜肉
小鲜肉 2021-01-04 18:27

Why do I fail to extract an integer value into the Num variable?

#include 
#include 
#include 

usi         


        
4条回答
  •  囚心锁ツ
    2021-01-04 18:58

    STL! :P

    stringstream ss("1 2 3");
    vector Tokens;
    copy(istream_iterator(ss), istream_iterator(), back_inserter(Tokens));
    

提交回复
热议问题