Help with go fish

hey everyone. this is my first post. i am new to c++ and need some help. fist of all i am self taught through books.

i am writeing a go fish program for my brother. i am a little stuck here is the code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// go fish 2.0

#include <iostream>
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<ctime>

using namespace std; 

int main ()
{
	int human = 1;
int scores[4];
char names[4][20];
int deck[4][13];

	
    int current = 1;

	enum asuit {hearts=1,diamonds,clubs,spades} suit;
	enum acard {ace=1,two,three,four,five,six,seven,eight,nine,ten,jack,queen,king} card;

	cout << "Welcome to GO FISH! I am your card shark CHAD.\n\n"; 
    cout << "The game is case-sensitive.\n\n";

 	
 	cout << "Enter the number of players: " << endl;	//Set player number
 	cin >> human;
 	
 	for (int counter=1;counter<=human;counter++)	//Enter player names
 	{
 			cout << "\n\nPlease enter your name player " << counter << ":" << endl;
 			cin >> names[counter];
 	}
 
 for (int counter=1;counter<=human;counter++)
 	{	
 		while (current!=6)
 		{
 			int rone=0;
 			int rtwo=0;
 			rone = rand()%4;
 			rtwo = rand()%13;
 			if (deck[rone][rtwo]==0)
 			{
 				deck[rone][rtwo]=current;
 				current++;
 			}
 		}
 	}
 	return 0;
 }



any suggestions or help will be greatly appreciated

thanks,
chad
You forgot to mention where you are stuck or where you need help. :P

Or the error messages you get.
it runs as of now but i cant figure out how to (as you see i have used enum) make the cards go to the computer and your self. it will only be you vs. the computer. and also i cant figure out how to check for matches of four.

sorry for being vague
BUMP
Perhaps you could make a class/struct Player for each player of the game so you can store their hands. The computer could be of that class also, you would just need a boolean value to tell the game whether or not it should ask for an action.
Topic archived. No new replies allowed.