Ok I am trying to add card suits to my game. I completed the game simulation but just trying to add some more to it. currently the game will generate random cards ie(numbers) include k for king, Q for queen, j for jack, and A for ace. Now I want to add random suits to this. I created the function below but i keep getting. the following error message when I compile.
342 conflicting types for 'dealFace'
44 previous declaration of 'dealFace' was here
currently the program will print out all four suits accross the top like a logo. Now I would like to add suits to my random card numbers.
Also how do I add color to background. Like change it to a green, or have the screen flash when player wins. or some kinds of chime.
which ever is simplist I will try to use. I'm just a beginner so if it is complicated for me to follow right now. I will not use, but appreciate any suggestions.
Thanks.. Code below.
Code:const char HEART = (char)259; const char DIAMOND = (char)260; const char SPADES = (char)262; const char CLUBS = (char)261; char dealFace( char face[] ); char face [4] = { HEART, DIAMOND, SPADES, CLUBS}; dealFace( char face[] ) char dealFace( char face[] ); { int value = 0; int random = 0; random = rand() % 52 + 1; //Random number generation while( face[random] == 0 ) { random = rand() % 52 + 1; } value = face[random]; face[random] = 0; return value; }