| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Using namespace std;
using namespace std;
I have seen this several times in the beginning of some programs. I have no idea what it means. Care to expand on that anyone? |
|
#2
|
||||
|
||||
|
Ok I started to try and explain this but I am not very good at it so heres a link that will hopefully help clarify what it does and can be used for.
Namespaces But in short it basically helps the default libraries work correctly and allows you to use certain functions associated with C++ such as instead of using the global call std::cout; with using namespaces std; it's just cout<<. Hope this stuff helps a little. I really have never looked that far into it. So good post man. ![]()
__________________
---Official Member Of The Itsacon Fan Club--- ![]() Give a man a fish and he will eat for a day. Teach a man to fish and he will sit in a boat all day drinking beer. Last edited by Geo.Garnett : January 11th, 2006 at 09:29 PM. |
|
#3
|
|||
|
|||
|
std is the namespace under which the standard stuff like input/output (cin/cout) are defined.
You must use the std namespace if you are to make use of those standard API calls http://www.programminghelp4u.com |
|
#4
|
|||
|
|||
|
using namespace std;
means to include package with the name "std" or standard. In new versions of C++ , vendors have come with new packages or libraries. I am not so sure but using namespace std looks familiar to using keyword in JAVA. So, I think it is a third party module. Example: In JAVA we use : import java.awt.* using <nameof Package> This looks analogous to C++ code #include<file.h> using namespace std |
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > Using namespace std; |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|