title: Simple text editing program in C++
body: <p>I got a little bit of trouble creating a program that edits text in C++. Keep in mind that I'm still at the beginning of programing. Here is what I must do:</p>
  
  <p>Some text is placed in text file F. I must write a program-editor, which based on the file F, commands and data from the keyboard creates the file FF. The program-editor must recognize and process the following commands:</p>
  
  <p>AN - insert text after the n-th row;</p>
  
  <p>IN - insert text before the n-th row;</p>
  
  <p>CM,N - substitution of the rows from m-th to n-th;</p>
  
  <p>DM,N - deleting the rows from m-th to n-th;</p>
  
  <p>E - end of editing;</p>
  
  <p>where m and n are the number of rows in the file F.The commands are recorded one on row and are made as a menu.</p>
  
  <p>This is the program. I researched a lot in the web about text editing and there are some text editing programs' source codes, but I guess I'm still in the beginning of programing and I find those source codes really difficult to understand. I'm concerned about few things:</p>
  
  <p>Must I manually put text in the text file F and must I add another option in the menu about adding text;</p>
  
  <p>The other thing is about the commands - how do I find and use the different rows from the text so I can insert, substitute and delete rows;</p>
  
  <p>Well that is all. If you have the time please help me, because I really need to know how this program must be done in a not so complicated way and I think it got some valuable things that I could learn from it. Thanks in advance !</p>