if i add another break then it breaks out of my do loop that runs the whole code and ends the game. should i put it in its own class?
Type: Posts; User: altf4thc
if i add another break then it breaks out of my do loop that runs the whole code and ends the game. should i put it in its own class?
my code is supposed to find 1 match and break but it keeps going and finds them all. it searches my 3 words in my string array and makes sure that they are not already replaced.
for (int i=0; i...
i dont know why i didnt think of using a string array. i was already overloading the strings but it worked and i can still overload them.
thank you so much
i want to do the same thing to several variables such as xword1, xword2, xword3...They are all the same type and in my case usually a string. is there a way that i can do something like xword[i] to...
i cant seem to get it to work like that. maybe because my variables are not of type int. before was a bad example i guess. here is a piece of my code.
if (curWord1 == ""){ //puts *'s in place of...
thanks. i got it now. i have another question im not even sure you can do in c++.
i want to do the same task to several different variables with as little code as possible. is there a way to do...
well i found a cheap way to get more numbers out of it.
randomWord_int = rand()+rand() % lineCount -1
it just doubles its so now i am getting numbers up in 50000 range.
so how can i do that. here is the code. i have some extra couts in there for testing purposes. keep in mine i am kinda new to c++.
string randomWord(){
char retry = ' ';
int lineCount = 0;...
RAND_MAX came back as 32767.....huh?
i am using srand and rand to generate several random numbers. after i finally figured out that i was calling srand every time that i generated one. i moved it and now it generates different numbers....
Thank you so much. sorry for the stupid question.
i am using eclipse and its telling me that c is not declared in this scope.
int main(){
hangman hangmanrun;
do {
hangmanrun.hangmanclass();
cout << "Play again? [y]es or [n]o"...