Laserlight: I'm really new to programming and C++ so that'd be why my classes are funky. I really haven't even read anything about OOP design or even covered all the standard C++ things. I read...
Type: Posts; User: pieisgood
Laserlight: I'm really new to programming and C++ so that'd be why my classes are funky. I really haven't even read anything about OOP design or even covered all the standard C++ things. I read...
This is how I am trying this... it's obviously not working. I was just trying to get the first line in the file as a sort of test to see if I could properly use ifstream... turns out I can't lol!
...
Ok... I know how to use and set rand() but is there a place that will show me how to select a line from an ifstream so that I can say "ifstreamfile ("blah.txt", randomlinenumer) = wordtobeguessed" so...
Yeah, when I changed it into its working form I declared the object "hangman" in main instead of globally. Probably good to do that from now on... don't want to do that and get all messed up later...
Yeah, Auralius it's private... I didn't go into writing this program with a plan so I just sort of skipped a whole bunch of readability steps (such as typing out "private:" to be clear which...
Thanks Daved, It's working now. I can see what I did with the "that's not the letter!" thing... for each [i] that's repeated in the loop it returns the else statement... I'll fix that next... then...
I believe I did everything you said... it still crashes when run. Though it certainly looks better. thanks for the help...
#include <iostream>
#include <string>
using namespace std;
...
Can anyone tell me what my major malfunction is here? I want to add other functionality to this program so I decided I might as well use classes and that got me about as far as this
#include...