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
Please login or Register to submit your answer