I'm trying to make a program that let's you play magic the gathering through console, but I an't get the while loop to work. It only runs twice. Here is the code.
thing is an empty string initially, so the while loop will never be entered.
Also, you're reading a word from cin into input, but you're overwriting it each time before actually using it.
In line 19, you're using numofcards uninitialized.
Why are you opening the same file twice? If you want to be able to both read and write, you should use an fstream.
I want it so it writes in the file what I enter the first time, then, when I overwrite the string, it writes what I enter on ANOTHER line. Oh, and I changed it so thing = y after I posted this, but now it runs the loop jiust twice