I have a main function:
Code:
ofstream csis;
int main(){
csis.open("csis.dat");
Do Stuff...
cout << stuff; //outputs stuff to the terminal window
csis << stuff; //writes the same stuff to the file
Object fun;
fun.dosomething(x,y);
fun.print(); //this is where the problem comes in
csis.close()
}
The Object member function print looks like this:
Code:
void Object::print(){
cout << something; //outputs something to the terminal window;
csis << something; //I want to somehow write this to the same file/append it to the file
}