Hello... I was wondering if anyone could tell me how to open a file in one function and write data to the file in another? Or is that considered bad programming?
My code is below. It has errors.
void File2( ofstream );
ofstream fout(FILE, ios::out|ios::app);
fout << "File1" << endl;
void File2( ofstream fout )
fout << "File2" << endl;