Firstly, have you got "#include <iostream>" in your code? You need to do that for the object 'cin' to be defined. If you've already done that, then learn about 'namespaces', because it is my guess that this is your problem. I might be wrong, but it's hard to tell without seeing your code. Basically, the object 'cin' is defined within a namespace called 'std'. That means the object's full name is 'std::cin'. You can refer to it like that in your code. This is my preferred method.
If you really want to just refer to it as 'cin', you'll have to import the name 'cin' into your working namespace. You can do that in more than one way. One way is to use:
using namespace std;
This will import all names from the std namespace so that they are accessibly without the 'std::' prefix.
Another way is to use:
using std::cin;
This only imports the one name, 'std::cin'. It's better because you won't pollute your namespace with all sorts of names from the 'std' namespace that you won't use.
If you're going to do it that way, put one of those lines directly after the '#include <iostream>' line.
But like I say, I prefer to just use fully qualified names so as to avoid importing any names at all.
(Edited by Misero at 3:09 am on April 10, 2006)
-------
"I am against religion because it teaches us to be satisfied with not understanding the world."