I've been a bit confused lately on how to use fstream. I understand the infile and outfile basics, but for example if I were to have a txt file that had questions on it, and say wanted to write a program that allowed a user to see these sets of questions on their screen, and I wanted to allow the user to answer the questions that appeared on their screen, and after being prompted to answer the questions, there answers would appear on the screen side by side each question.
And I've also been confused on how to give for example the text on the txt file, a a string value, and numbers a double value, so that they can stored for later use for calculations for example.