I am working on some sort of a notepad in c++. My idea is that user will be able to set a category and tags for each notes. Then he will be save the note and open it, while my program will keep those tags and category. However I am not sure how to exactly save vector to file and then open it so I can have access to it.
if ( infile . is_open() )
{
while ( !in_file . eof () )
{
infile >> category;
}
}
ofstream f ( filename )
if ( f . is_open () )
{
f << category;
}
f . close ();
The code above works just fine for saving and opening file with category, however I don't know how to do the same with vector of strings for tags. Anybody who could help me out with this would be much appreciated.