i have a problem:
when entering a char instead of an int as an input, the loop won't stop running.Code:int x=0; while(x!=6) { cout<<"in the loop"<<endl; cin>>x; }
How do I fix it? I want it to enter the loop normally, and ask me for a new input(like it does with any integer other than 6..).
Thanks!