Second simple question. For example, I get 5 letters from the file (from the middle) with get function and for example change second letter to 'g' and then want to replace the old 5 letters that I picked with the changed 5:
Picture the file as a long single queue of characters with a pointer moving from start to beginning. Every time you read a character from the file, the pointer moves forward one step. Both get() and put() move the pointer forward one(or more) step(s). So as jsmith you need to move the pointer backwards to rewrite in the location as you read.