Input negative integer

I tried to write inout that allows user to input negative integers, but figured uot can't do it with "standard":
1
2
int x;
std::cin >> x;


With what code could I input -5 for example?
closed account (48T7M4Gy)
type -1 without a space between - and 1
Topic archived. No new replies allowed.