I have a vector of class type:
class Random
{
public:
Random(int _x, std::string _y, juce::File _z)
{
x = _x;
y = _y;
z = _z;
}
private:
int x;
std::string y;
juce::File z;
};
std::vector<Random> randoms;
And I can fill the vector with something like this:
void populate(int x, std::string y, juce::File z)
{
randoms.push_back({ x, y, z });
}
But how can I save and reload the contents of the vector randoms that I’m using for this juce app?
I found that the juce library includes FileOutputStream and FileInputStream, which might be helpful for this issue. However, I couldn’t figure out how to implement it in my code, and I couldn’t find any examples.