Hey guys
if i enter a letter in whilst running this program it outputs zero. I know num is an int and they cant deal with characters . I am trying to make it so my program refuses everything apart from numbers. Any help appreciated cheers!
[code]
int main(void)
{
char num=0;
cout << "Enter a number!" << endl;
cin >> num;
cout << num << endl;
return(0);
}
[code\]