How to return chunks of vector from a function in c++

Viewed 29

I would like to transfer data from one machine to other machine. Due to hardware & software limitations, the data i.e., vector(huge data) needs to be chunked and returned from my function which is implemented in C++. Could someone provide me a direction of how the vector could be chunked and these chunks could be returned one at a time from that function? The fundamental problem here is, as the return function can only send first chunk and then obliviate, I am wondering how can I send all the chunks?

0 Answers
Related