Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: psfign

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    33
    Views
    2,111

    Re: Question for Rock Paper Scissors game program

    Judas Priest! No, i dont understand that lol!

    But, I just looked at my grade for the paper rock scissors. Got my first 100 without having to go back and make corrections! And that was the semester...
  2. Replies
    33
    Views
    2,111

    Re: Question for Rock Paper Scissors game program

    ****! I shoulda saw the double declaration there. My bad! Thanks, that cleared it up!
  3. Replies
    33
    Views
    2,111

    Re: Question for Rock Paper Scissors game program

    #include <stdlib.h>
    #include <iostream>
    #include <iomanip>
    #include <string>
    #include <time.h.>
    using namespace std;
    int userChoice(void);
    char getChoice(void);
    void winOrLose(int,int);
    char...
  4. Replies
    33
    Views
    2,111

    Re: Question for Rock Paper Scissors game program

    i have that but it resets after every turn
  5. Replies
    33
    Views
    2,111

    Re: Question for Rock Paper Scissors game program

    I always have a problem with keeping score total. How do I return the wins/losses/draws to keep score each time. So am I correct that I cant return the score in a void funtion like this? Do i need to...
  6. Replies
    33
    Views
    2,111

    Re: Question for Rock Paper Scissors game program

    That got it! Thanks! Now, all i have to do is tally up wins/losses
  7. Replies
    33
    Views
    2,111

    Re: Question for Rock Paper Scissors game program

    Thanks! I think i have an issue with my winOrLose function too though.



    #include <stdlib.h>
    #include <iostream>
    #include <iomanip>
    #include <string>
    #include <time.h.>
    using namespace std;
  8. Replies
    33
    Views
    2,111

    Re: Question for Rock Paper Scissors game program

    well this is what i have so far. It wont cout the answer. Im stuck.. :(



    #include <stdlib.h>
    #include <iostream>
    #include <iomanip>
    #include <string>
    #include <time.h.>
    using namespace std;
  9. Replies
    33
    Views
    2,111

    Re: Question for Rock Paper Scissors game program

    Update:

    I'm not any closer than I was yesterday!
    No...Im not posting my code. lol
    I'm embarrassed this stuff isnt sticking
  10. Replies
    33
    Views
    2,111

    Re: Question for Rock Paper Scissors game program

    We havent learned how to do the conv like that, so i think I'd have to do it as


    num = Computer's selection

    if (num == 1)
    return 'R';

    Thanks for your help again guys! I didnt post my code...
  11. Replies
    33
    Views
    2,111

    Re: Question for Rock Paper Scissors game program

    Thanks!
  12. Replies
    33
    Views
    2,111

    Re: Question for Rock Paper Scissors game program

    Yea I know 2k, but i was trying other things that i thought would work....that obviously didnt work.

    and looking at your example, im assuming i can use return '1' as code for Rock
  13. Replies
    33
    Views
    2,111

    Re: Question for Rock Paper Scissors game program

    yea, i havent looked at doing that switch 2k gave yet. But a couple follow up questions. Am i correct in the thought that i could do something like:


    num = Computer's selection

    if (num == 1)...
  14. Replies
    33
    Views
    2,111

    Re: Question for Rock Paper Scissors game program

    Love Big Bang Theory! :p

    But, teacher wants user to imput letters. Im not doing very well trying to compare an int to a char.

    Any ideas? Ive tried some things that compile, but they dont run.
    ...
  15. Replies
    33
    Views
    2,111

    Re: Question for Rock Paper Scissors game program

    ok, i think i can compare. so ill work on that. ty
  16. Replies
    33
    Views
    2,111

    Re: Question for Rock Paper Scissors game program

    well the computer generating it's choices as 1, 2 or 3. So how do i compare
  17. Replies
    33
    Views
    2,111

    Question for Rock Paper Scissors game program

    My teacher wants the user to enter in their choices with characters instead of numbers.
    R - Rock
    P - Paper
    S - Scissors.

    After the user enters R for their choice, what would I use to convert...
  18. Re: error: undefined reference to 'printSpecChar(int)

    oh ok and i did have to upgrade bc g++ kept crashing.

    but i dont understand the void functions. can someone explain how to define them? do I place a value in the ( )?

    void printSpecChar(int);...
  19. Re: error: undefined reference to 'printSpecChar(int)

    ok, i'll work on those, but why does stdlib.h work still if it's supposed to be cstdlib? And why didnt i have to use that on win7?
  20. error: undefined reference to 'printSpecChar(int)

    I just purchased a laptop with Windows 8 and installed the portable Dev-C++ because the other one wasnt compatible with Win8.

    Now im getting an error when i compile that says:
    'undefined...
  21. Replies
    7
    Views
    591

    Re: Not sure what kind of code to write

    yup, especially when i suck at it.
  22. Replies
    7
    Views
    591

    Re: Not sure what kind of code to write

    well i received verification from the prof last night that i only display the stats after the user enters the correct answer. So, i did the code how I 'designed' and it worked...so woot.
  23. Replies
    7
    Views
    591

    Re: Not sure what kind of code to write

    So here's how Im thinking about the design.

    1. <Into>
    2. clear screen
    3. com generates num

    do (count number of tries, games & start/stop)
    while (guess != num)
    if...
  24. Replies
    7
    Views
    591

    Re: Not sure what kind of code to write

    well youre right, I have been. But like you said and someone said in my last thread.... Im going to try to write out the program steps on notebook and then write the code from that.
  25. Replies
    7
    Views
    591

    Re: Not sure what kind of code to write

    So on this program, I have started off first by creating parts of the program individually.

    I created a intro page that just couts the rules, etc.
    created a random number generator and a loop for...
Results 1 to 25 of 71
Page 1 of 3 1 2 3


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center