Cin and Cout- Class or object
-
hi friends, i am infront of you with another doubt. We are using cin and cout in C++. Whether these are class or object. if they are object how can we use them without declaring that it belongs to this class. Thanks for u in advance. Shamnar:confused:
shamnar
-
hi friends, i am infront of you with another doubt. We are using cin and cout in C++. Whether these are class or object. if they are object how can we use them without declaring that it belongs to this class. Thanks for u in advance. Shamnar:confused:
shamnar
-
NrmMyth wrote:
cin is a class
no, cin is an instance of a class (std::ofstream class). the difference between a class and an object is that a class defines a type, while an object is an instance of that class (an instance of the type of the class)
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
-
hi friends, i am infront of you with another doubt. We are using cin and cout in C++. Whether these are class or object. if they are object how can we use them without declaring that it belongs to this class. Thanks for u in advance. Shamnar:confused:
shamnar
well, i not only don't understand what you mean, but for the second time, i tell you that you ask about UNMANAGED C++, in a Managed C++ forum... this is the wrong place ! BTW, see my reply to the other guy to get some infos. the point is that cout and cin are instanciated at the beginning of your program (implicitely)
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
-
NrmMyth wrote:
cin is a class
no, cin is an instance of a class (std::ofstream class). the difference between a class and an object is that a class defines a type, while an object is an instance of that class (an instance of the type of the class)
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
-
hi friends, i am infront of you with another doubt. We are using cin and cout in C++. Whether these are class or object. if they are object how can we use them without declaring that it belongs to this class. Thanks for u in advance. Shamnar:confused:
shamnar
cin and cout aren't class or object. They are both functions. we can use them without declaring because they have been declared in iostream.h -- modified at 2:53 Sunday 13th August, 2006 -- modified at 2:55 Sunday 13th August, 2006
I love this web