|
From: Noorez K. <coo...@ho...> - 2004-07-21 17:03:53
|
#include <iostream>
#include <conio.h>
using namespace std;
namespace myf
{
void wait(char message[], char contin)
{
if(contin == '') //make sure that contin is not blank
{
//if it is...
cout << "Press any key to continue...";
while( !kbhit() )
{
}
return;
}
cout << message << endl; //do what is told
char get;
while(1) //loop till we get the correct value
{
get = getch(); //'empty character constant' error
if(get == contin)
{
return;
}
}
}//end wait()
}//namespace myf
I am trying to put this function into a library of other functions of my own
but I'm getting a compile error on the marked line.
_________________________________________________________________
Take charge with a pop-up guard built on patented Microsoft® SmartScreen
Technology
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.
|