hey all, hope you're having a fine evening.
you know you're moving up in the world when you finally get an error you've only read about Does someone mind pointing this out for me? Thanks.
error:Error: Unresolved external 'f_deal(int[13] *, const char * *, const char * *)' r
eferenced from C:\BORLAND\BCC55\BIN\POKER.OBJ
Code:
#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <ctime>
using namespace std;
void f_shuffle (int [] [13]);
void f_deal (const int [] [13], const char *[], const char *[]);
main()
{ const char *suit [4]={
"Hearts", "Diamonds", "Clubs", "Spades",};
const char *face [13]={
"Ace", "Deuce", "Three", "Four",
"Five", "Six", "Seven", "Eight",
"Nine", "Ten", "Jack", "Queen", "King",};
int deck [4] [13]={0};
srand (time(0));
f_shuffle (deck);
f_deal (deck, face, suit);
return(0);
}
void f_shuffle (int _deck [] [13])
{ int row, column;
for ( int card = 1; card <=52; card++)
{ do
{ row=rand() %4;
column=rand() %13;
}while (_deck [row] [column] !=0);
_deck [row] [column] = card;
}}
void deal (const int _deck [] [13], const char *_face, const char *_suit[])
{
for (int card=1; card <=52; card++)
{ for (int row=0; row<=3; row++)
{ for (int column=0; column <=12; column++)
{ if (_deck [row] [column] == card)
{ cout<<setw(5)<<setiosflags(ios::right)
<<_face[column]<<" of "
<<setw(8)<<setiosflags(ios::left)
<<_suit[row]
<<(card %2 ==0 ? '\n' : '\t');
}}}}
}