I can't seem to get that function to work correctly. My files will compile but when I run the program it just says "press any key to continue" instead of showing me any of my outputs from any of my functions in the program. What am I doing wrong? Here is the code exerpt:

#include <dos.h>

void CRobot::work()
{
if (task == DRILLING)
sleep(DRILLTIME);
cout <<robotName<<" has completed the task DRILLING\n";
if (task == LIFTING)
sleep(LIFTTIME);
cout <<robotName<<" has completed the task LIFTING\n";
if (task == CUTTING)
sleep(CUTTIME);
cout <<robotName<<" has completed the task CUTTING\n";
if (task == ASSEMBLING)
sleep(ASSEMBLETIME);
cout <<robotName<<" has completed the task ASSEMBLING\n";
if (task == DISPOSING)
sleep(DISPOSETIME);
cout <<robotName<<" has completed the task DISPOSING\n";
}

//causes robot to sleep for n seconds
void CRobot::sleep(int n)
{
sleep(n);
}

These functions are part of a header file which creates the robot, and then I have a cpp file that calls the work function which should call the sleep function, but the functions don't seem to be doing anything. Please help me figure out what is going wrong.