Garmaine Staff asked 2 years ago
Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 10 hours ago.

So i am trying to write the objects from my std::vector to an csv file and i keep getting that error. This is my code:

#include "Service.h"

#include <iostream>
#include <fstream>
#include <string>
#include <functional>
#include <algorithm>
#include <assert.h>
#include <vector>

void ManagerActivitati::exportF(string nume) {
    ofstream myFile("nume.csv");
    for (const auto& act : rep.getAll()) 
    {
        myFile << act << endl;
    }
    myFile.close();
}

rep.getAll() returns the vector