Thread: unresolved external

  1. #1
    Registered User blight2c's Avatar
    Join Date
    Mar 2002

    unresolved external

    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

    #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 *[]);
    {	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);
    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 "
    						<<(card %2 ==0 ? '\n' : '\t');

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Your function definition for f_deal should look like this:
    void f_deal (const int _deck [] [13], const char *_face[], const char *_suit[])

    Sometimes it helps to include the names in your prototype and then copy and paste that as your definition. That way you're sure that both the prototype and definition are the same.

    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  3. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02:28 PM
  4. debug to release modes
    By DavidP in forum Game Programming
    Replies: 5
    Last Post: 03-20-2003, 03:01 PM
  5. Unresolved external symbols in OGL
    By Shadow12345 in forum Game Programming
    Replies: 4
    Last Post: 08-04-2002, 09:46 PM