September 22nd, 2003, 01:42 PM
Join Date: Sep 2003
Time spent in forums: 22 sec
Reputation Power: 11
inputing into files
Here is my question. I have a program where I have 2 functions. The first function (main) gathers two inputs of type string. I also remove the origional file so as to get rid of any left over text.
The other function is able to take one string at a time and place it into a file. Now the problem is when I run the program and I open up the file, only the last string is in the file, and not both.
Here is the code.
using namespace std;
void f1(string text)
cout<<"enter string 1"<<endl;
cout<<"enter string 2"<<endl;
I understand that I could make f1 just take 2 strings but I need to do it this way.
This message is a natural product made from recycled electrons. The slight
variations in spelling and grammar enhance its individual character and
beauty and in no way are to be considered flaws or defects.