cin not working

hello again! today I tried making a small program using the cin function however my compiler said that there was "no match for operator> in 'std::cin> i'"
please help! thanks in advance!

1
2
3
4
5
6
7
8
9
10
#include <iostream.h>

int main (int argc, char * const argv[]) {
	int i;
	cin > i;
	if (i > 10) {
		cout << "its more than 10";
	}
    return 0;
}


also, line 5 was the line witch gave me the error message
You typed cin > i; when you meant to type cin >> i;
thanks! that fixed it I'm not sure why I dident that I missed the second >. I feel stupid now.
Last edited on
Topic archived. No new replies allowed.