//********************************************* //test read and write operation in text file //********************************************* #include #include using namespace std; //============================================= int main(){ char thought[300]; char recThought[20]; ofstream write("myThought"); if(!write){ cout<<"Error opening file\n"; return 1; } cout<<"insert your thought(press 'x' to finish)\n"; cin>>thought; write<>recThought; cout<