Domain changed to archive.palanq.win . Feb 14-25 still awaits import.
[3 / 1 / 2]

C++ help

No.1269327 View ViewReplyOriginalReport
How do I take an integer and check if the input is actually an integer? It's hard to describe, but here's example

int x;
cin>>x;
(user inputs abc)
cout<<x;
0
(rest of code)

cout will tell me that x==0 and it will proceed to break the rest of my code, but

(user inputs 0)
cout<<x;
0

cout will tell me that x==0 but the rest of my code will work as intended,

How do I check if x==0 and isn't just a string roleplaying as 0? I need the user to be able to input 0, but return if x isn't an integer