My code is outlined below. I am trying to read in
heart two 2
heart three 3
etc to an array of cards i have named deck. I "think" i may have set up the read correctly, but my file will not open. I always get the "Error" message in the if(!fin.good()) so my text file is not reading correctly. I have no linux password. What can i do to fix this?? I have read your tutorial on i/o files, please help!!
There is nothing wrong with your loops (you never reach them).
The fact that you can't open the file, means it is in the wrong place.
It should be in the same directory as your executable.