Hi there
I'm trying to ofstream (output) data to an excel file (csv), and I keep getting this error "file was not declared in this scope". Can you guys help me on this? where is the error?
This is the output function,
void FileOutput()
{
int t;
static float totallength=0;
ofstream outData("Output1.csv");
if (file.good())
{
outData << t <<","<<totallength<<endl; //writing
}
file.close();
outData.close();
}