im doing this function to disable echoing the user input... how can i make a control on/off to this function??
if using a boolean.. how so?
bool echo()
{
DWORD mode;
HANDLE hConIn = GetStdHandle( STD_INPUT_HANDLE );
GetConsoleMode( hConIn, &mode );
if true
{
SetConsoleMode( hConIn, 0 );
}
else if false
{
SetConsoleMode( hConIn, mode );
}
return 0;
}
if i want the function to be on..
should i do.. echo(bool on); ?
You should call the function either with boolean literal true or false.
For example
echo( true );
or
echo( false );
Last edited on
it still doesn't work.. =(
echo is still disabled even if i put echo (false) in it..
Not surprising, you have the order wrong.