View Full Version : [SOLVED] C++ help!!!

November 15th, 2008, 08:43 AM
Hey everyone, i am a beginner in C++ and borrowed a book on C++ from the library. I am using Geany as my IDE. When i tried to compile this code i get this error
project.cpp:33: error: no match for ‘operator>’ in ‘std::cin > i
Can someone help???](*,)](*,)](*,)]

#include <iostream>
#include <cstdlib>
#include <stdlib.h>
#include <string.h>

using namespace std;

int main(int argc, char** argv)
int i;
cin > i;
if (i > 10)
cout << "It's greater than 10." << endl;
cout << "It's not greater than 10." << endl;
return 0;

November 15th, 2008, 08:45 AM

cin >> i;

November 15th, 2008, 08:46 AM
replace cin > with cin >> at line 11

November 15th, 2008, 08:46 AM
Thanks! stupid book gave me the wrong info. But i cant blame it cuz the IDE mentioned in the book is dev-C++.

November 15th, 2008, 08:48 AM
That shouldn't matter since I think dev-C++ uses g++ to compile which is the same as geany. I'd bet it's just a typo.