So I have an array of strings called blog[] and I'm trying to use a string from the array at position i, like:
outfile << blog[i];
But the problem is that blog[i] is of type MicroBlog (MicroBlog is a class I'm working with)
So my question is how can I convert from type MicroBlog to type string?
Here is the method I'm trying to use blog[i] in:
bool MicroBlog::SaveBlog(const string filename, const MicroBlog &AnotherMicroBlog)
{
ofstream outfile;
outfile.open(filename.c_str());
num_tweets = AnotherMicroBlog.num_tweets;
for (int i=0; i < num_tweets; i++)
{
outfile << blog[i];
outfile.close();
}
}