Search:

Type: Posts; User: altf4thc

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    3,386

    if i add another break then it breaks out of my...

    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?
  2. Replies
    3
    Views
    3,386

    nested for loop

    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...
  3. Replies
    2
    Views
    1,597

    i dont know why i didnt think of using a string...

    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
  4. Replies
    2
    Views
    1,597

    change variable and repeat

    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...
  5. Replies
    11
    Views
    1,564

    i cant seem to get it to work like that. maybe...

    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...
  6. Replies
    11
    Views
    1,564

    thanks. i got it now. i have another question im...

    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...
  7. Replies
    11
    Views
    1,564

    well i found a cheap way to get more numbers out...

    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.
  8. Replies
    11
    Views
    1,564

    so how can i do that. here is the code. i have...

    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;...
  9. Replies
    11
    Views
    1,564

    RAND_MAX came back as 32767.....huh?

    RAND_MAX came back as 32767.....huh?
  10. Replies
    11
    Views
    1,564

    random numbers

    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....
  11. Replies
    2
    Views
    9,658

    Thank you so much. sorry for the stupid question.

    Thank you so much. sorry for the stupid question.
  12. Replies
    2
    Views
    9,658

    c was not declared in this scope

    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"...
Results 1 to 12 of 12