0

Hey, if i understand it right, classes are "datatypes" of objects, right? But how is the sdt::cout working? Isn't it a class?

C++ classes/objects

13th Dec 2018, 8:52 PM
Daniel
7 Réponses
+ 3
No, namespace members are accessed using :: Example: <namespace>::<member>
13th Dec 2018, 8:54 PM
Dread
Dread - avatar
+ 2
No problem.
13th Dec 2018, 8:55 PM
Dread
Dread - avatar
+ 2
cout is an object belong to std namespace... More info here https://en.cppreference.com/w/cpp/io/cout
13th Dec 2018, 9:29 PM
KrOW
KrOW - avatar
+ 1
Or why i access it with “::“ and not with "."?
13th Dec 2018, 8:53 PM
Daniel
+ 1
std:: is a namespace.
13th Dec 2018, 8:53 PM
Dread
Dread - avatar
+ 1
So this isnt a class?
13th Dec 2018, 8:53 PM
Daniel
+ 1
Ok thank you 😉
13th Dec 2018, 8:55 PM
Daniel