Thread: Help making heart,spade,diamond,clover for texas holdem game

  1. #1
    new to c++
    Join Date
    Feb 2009
    Posts
    53

    Help making heart,spade,diamond,clover for texas holdem game

    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;
    
    }

  2. #2
    Registered User
    Join Date
    Mar 2009
    Posts
    399
    The symbols must be present in your console's current character set. What character set did you find them in? Try changing the character set of the console to the one that has the desired characters.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 20q game problems
    By Nexus-ZERO in forum C Programming
    Replies: 24
    Last Post: 12-17-2008, 05:48 PM
  2. PC Game project requires c++ programmers
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 02-22-2006, 12:23 AM
  3. Problem with a game im making
    By TheGr8one in forum Game Programming
    Replies: 2
    Last Post: 10-19-2001, 07:38 PM
  4. Before making a game...
    By Leeman_s in forum Game Programming
    Replies: 1
    Last Post: 10-04-2001, 11:02 PM
  5. Lets Play Money Making Game
    By ggs in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 09-04-2001, 08:36 PM