card picker program

i am trying to generate random cards for a poker game almost but i am quite new to this software so im still not quite sure what i am doing half the time, i have to generate 5 ramdom cards and do a check that the same card has not been drawn twice, this is what i have so far:

#include <iostream>
#include <string>
#include "math.h"
#include "time.h"


int main()
{
int suit = {heart, diamond, club, spade};

int rank = {ace, two, three, four, five, six, seven, eight, nine, ten, jack, queen, king};

system("pause");
}
srand()
{
std :: cout >> rank >> suit;

return 0;
}

anybody have any modifications i could make to this to achieve this program?
We've had problems like this before in the past. Personally, I would create a card class with suit and value variables then create a vector/array of 52 of them.

At the very least, you'll need two arrays or a 2D array. Your declaring two integers and assigning them incorrectly. This, coupled with some missing terminators and misplaced braces makes me pretty sure that your current code won't compile.

Finally: http://www.cplusplus.com/reference/clibrary/cstdlib/srand/
Topic archived. No new replies allowed.