#include<iostream>#include<string>#include<fstream>usingnamespacestd;voidExplanation();voidLastUser();voidCurrentUser();stringText="";intmain(){system("cls");Explanation();LastUser();CurrentUser();system("pause");return0;}voidExplanation(){cout<<" PROGRAMMING ADVICE "<<endl<<endl;}voidLastUser(){fstreamdocument("advice.txt");document.open("advice.txt",ios::in);cout<<"Here is the advice given by the last person who ran this program:"<<endl<<endl;getline(document,Text,'#');cout<<Text<<endl<<endl;}voidCurrentUser(){fstreamdocument;document.open("advice.txt",ios::out);cout<<"Please enter your advice below. Your advice may be as long as you"<<endl;cout<<"need, but please indicate the end of input by pressing <Enter> twice:"<<endl;cin>>Text;document<<Text;document.close();}
All I did there was clean the code up a bit so others could read it easier. You might have more of a chance with people helping that way. ;}
All I did there was clean the code up a bit so others could read it easier. You might have more of a chance with people helping that way. ;}