Can you please always use the code tags - the <> button on the right.
It's not they are different, cin etc are part of the std namespace.
A namespace is a way separating out variable and function names to avoid name clashes which is more likely to happen if there is just one global namespace.
Basically, iosteam is a class that has cin etc , plus all kinds of other things like the operators in it. iostream stands for
input output stream. One needs to
#include <iostream>
to have access to the functionality the class offers.
Instead of
using namespace std;
you can do a couple of things:
1. put
std::
before each std thing, as in
std::find
2. put these after the include directives (for frequently used things):
1 2 3 4
|
using std::cin;
using std::cout;
using std::endl;
using std::string;
|
then you can refer to cout etc without any further qualification.
I tend to do a mixture.
If you look in the reference section at the top left of this page, you will see that all things in the STL need to use either of these methods.
Unfortunately the example code has
using namespace std;
throughout, which is a little bad IMO.
Anyway, try your hand at Google for these topics, Hope this all helps. Cheers.