home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_08_10
/
8n10067a
< prev
next >
Wrap
Text File
|
1990-08-26
|
492b
|
25 lines
/* Debugging Objects with Turbo Debugger
add the following line to the public part of the Queen class declaration:
void eatFood( int nUnits );
(i.e., the line before the closing brace of the declaration!)
*/
// Add the following function definition to the file ANTHILL.CPP:
void Queen::eatFood( int nUnits )
{
if (nEnergy < 20000)
Consumer::eatFood( nUnits );
else {
int oldX = nX;
int oldY = nY;
move();
showFood( oldX, oldY, TRUE );
}
}
// end of file