Hello again, I'm having a little problem with a while statement.
Everything works perfectly fine, as long as the "begin" integer in "cin >> begin" is a number/digit, but as soon as a letter is inserted, the whole program starts acting as if someone was holding the refresh button, and I am unable to do anything with it.
#include <iostream.h>
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
//cut-out of the code I'm having problems with
int begin;
system("color E");
do
{
cout << "Press 1. to start \nPress 2. for help \nPress 3. to exit\n";
cin >> begin;
if(isalpha(begin))
{
return 0;
}
system("cls");
}while(begin != 1 && begin != 2 && begin != 3);