#include #include using namespace std; int write(); int read(); int main(); int haha(); int haha() { string options; system("cls"); cout << "to exit type q" << endl << "to read a file type r" << endl << "to write a file type w" << endl; cin >> options; if (options == "q") return 0; else if (options =="r") return read(); else if (options == "w") return write(); } int main() { cout << "welcome to text editor, this is my first program so if you see any bugs or you dont understand something, email me at bubbahaley2@yahoo.com. hope you enjoy it" << endl << endl; string option; cout << "to read a text file, type read" << endl << "to write to a text file type write" << endl; cin >> option; if (option == "write") return write(); else if (option == "read") return read(); } int write() { system("cls"); char text[20000]; char thing[100]; ofstream file; cin.ignore(); cout << "which file would you like to write to?" << endl; cin.getline (thing, 100); cout << "what would you like to write? (up to two thousand characters)" << endl; cin.getline (text,20000); file.open(thing); file<