cout is defined in std namespace and we also include iostream to use cout...i am confused ,please clarify this.where
1)cout is defined
2)where it is declared.
and if we are including iostream ,then what is the need of STD::COUT
regards,
ravi_14 0 Light Poster
Recommended Answers
Jump to PostWhen you
#include iostream
, you get the object
std::cout
That is, you get the object
cout
, which is in the std namespace. You can use an object in the std namespace either directly:
std::cout << "Something";
or by stating that you want to use that particular …
Jump to PostIf you don't know what namespaces are then you need to read a good tutorial because namespaces are fundamental to c++ language. Namespaces were invented to keep from getting name conflicts from one file to the next, that was a big problem in C language. For example, file A.h might …
All 7 Replies
Moschops 683 Practically a Master Poster Featured Poster
ravi_14 0 Light Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
vmanes 1,165 Posting Virtuoso
ravi_14 0 Light Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
vmanes 1,165 Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.