hello
Im making a texas holdem game and Im not sure how to make the heart,spade,diamond and clover to hold the suit of a card. I thought that I could just copy one from a text editor like this, but it doesnt work. can i get some help?
Code:
void cardgeneratorplayer(int& card1,int& card2,int& card1suite,int& card2suite)
{
char suite;
card1=1+ rand() % 52;
card2=1+ rand() % 52;
card1suite=1+ rand() %4;
card2suite=1+ rand() %4;
if(card1suite==1||card2suite==1)
suite='♦';
if(card1suite==2||card2suite==2)
suite='♥';
if(card1suite==3||card2suite==3)
suite='♠';
if(card1suite==4||card2suite==4)
suite='♣';
cout<<"Your Cards:\n"<<card1<<suite<<"\n"<<card2<<suite<<endl;
}