Search:
Type: Posts; User: psfign
Search:
Search took 0.05 seconds.
-
April 29th, 2013, 09:09 AM
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...
-
April 28th, 2013, 05:14 PM
****! I shoulda saw the double declaration there. My bad! Thanks, that cleared it up!
-
April 28th, 2013, 04:39 PM
#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...
-
April 28th, 2013, 04:26 PM
i have that but it resets after every turn
-
April 28th, 2013, 03:39 PM
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...
-
April 28th, 2013, 02:19 PM
That got it! Thanks! Now, all i have to do is tally up wins/losses
-
April 28th, 2013, 11:40 AM
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;
-
April 28th, 2013, 12:08 AM
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;
-
April 23rd, 2013, 04:40 PM
Update:
I'm not any closer than I was yesterday!
No...Im not posting my code. lol
I'm embarrassed this stuff isnt sticking
-
April 22nd, 2013, 03:10 PM
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...
-
April 22nd, 2013, 02:50 PM
-
April 22nd, 2013, 02:47 PM
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
-
April 22nd, 2013, 02:33 PM
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)...
-
April 22nd, 2013, 01:47 PM
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.
...
-
April 21st, 2013, 03:32 PM
ok, i think i can compare. so ill work on that. ty
-
April 21st, 2013, 03:11 PM
well the computer generating it's choices as 1, 2 or 3. So how do i compare
-
April 21st, 2013, 02:46 PM
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...
-
April 2nd, 2013, 01:36 PM
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);...
-
April 2nd, 2013, 12:45 PM
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?
-
April 2nd, 2013, 12:22 PM
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...
-
April 1st, 2013, 05:53 PM
yup, especially when i suck at it.
-
April 1st, 2013, 03:50 PM
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.
-
March 31st, 2013, 01:18 PM
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...
-
March 31st, 2013, 01:10 PM
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.
-
March 31st, 2013, 01:08 PM
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...
|
Click Here to Expand Forum to Full Width
|