title: How to save a C++ console output in a text file?
body: <p>I have two console outputs of two different scripts. I want to compare these outputs with each other for finding conserved letters in both outputs along with their position in output. For this What I am trying to do is, I want to save both console outputs in two different text files and check those two files for conserved letters and their relative positions.</p>
  
  <p>Is I'm going in correct path or their can be another option for comparing outputs. If yes then provide the method for saving console outputs in text files. And if No then provide some other accurate method for comparing console outputs.</p>