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

This is a discussion on Help making heart,spade,diamond,clover for texas holdem game within the C++ Programming forums, part of the General Programming Boards category; hello Im making a texas holdem game and Im not sure how to make the heart,spade,diamond and clover to hold ...

  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, 08:38 PM
  4. Before making a game...
    By Leeman_s in forum Game Programming
    Replies: 1
    Last Post: 10-05-2001, 12:02 AM
  5. Lets Play Money Making Game
    By ggs in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 09-04-2001, 09:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21