I just wrote this tiny program just to try out my newly gained knowledge on text files, but I don't think its anything to do with the text file part which is causing the error:
38: parse error before `else'
Here is the code which I am having problems with...
cout << "\nWould you like to save your document?Yes .No";
cin >> answer;
if (answer = 2);
cout << "You may now exit";