How to read arbitrary number of values using std::copy?

后端 未结 8 700
情深已故
情深已故 2021-01-05 02:24

I\'m trying to code opposite action to this:

std::ostream outs; // properly initialized of course
std::set my_set; // ditto

outs << my_set.         


        
8条回答
  •  情话喂你
    2021-01-05 02:45

    Or you could do this:

    my_set.insert(std::istream_iterator(ins), std::istream_iterator());
    

提交回复
热议问题