What is the context of this question? For example, are you taking some kind of class in computer science?
How does any editor work? I imagine something like this:
Read a file into a buffer
Provide a display of the contents
Provide a user interface for editing---eg selecting with mouse, movable cursor, selecting with control-keys, etc.
Provide a user interface for storing the contents of the buffer---including options to select a new filename
|