Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Sorry if I still don't understand your problem, but here is what I usually do. You create an std::vector (or several) of required type and push_back there measurements from every iteration. Then, when you have significant amount of data (i.e. 1000 measurements), you can dump it to the filesystem. C++ provides you with several ways to do so.

You can even try to keep ALL data in the memory till the very end, it its size is small. But usually it is better to dump it periodically. You simply open a text file, append your data to the end, then close it until you have another potion.

Sorry if I still don't understand your problem, but here is what I usually do. You create an std::vector (or several) of required type and push_back there measurements from every iteration. Then, when you have significant amount of data (i.e. 1000 measurements), you can dump it to the filesystem. C++ provides you with several ways to do so.

You can even try to keep ALL data in the memory till the very end, it if its size is small. But usually it is better to dump it periodically. You simply open a text file, append your data to the end, then close it until you have another potion.