473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

About namespace std

Could anybody tell where is the namespace std file ? Thanks a lot !
namespace::std{
.....
....
}
Mar 27 '08 #1
4 1892
On 27 Mar, 12:53, 322322 <714794...@qq.comwrote:
Could anybody tell where is the namespace std file ? Thanks a lot !
namespace::std{
since a namespace isn't a file there is no namespace std (abbreviated
to std:: in this post) file. The things that are in std:: such as
std::cout are defined in standard includes

#include <iostream>

these *may* be implemented as files. But the mapping
is not defined by the language definition (possibilities
are iostream and iostream.h).

So since you can't have what you asked for, what do you really
want? Do you want a list of all the names in std::? It will be
huge! All I can suggest is google it.

<pause>

hmmm. maybe not such a good idea. Most hits seemed to be trying
to answer questions like "Why does it hurt when I pee?"
--
Nick Keighley
Mar 27 '08 #2


Nick Keighley $B<LF;!'(B
On 27 Mar, 12:53, 322322 <714794...@qq.comwrote:
Could anybody tell where is the namespace std file ? Thanks a lot !
namespace::std{

since a namespace isn't a file there is no namespace std (abbreviated
to std:: in this post) file. The things that are in std:: such as
std::cout are defined in standard includes

#include <iostream>

these *may* be implemented as files. But the mapping
is not defined by the language definition (possibilities
are iostream and iostream.h).

So since you can't have what you asked for, what do you really
want? Do you want a list of all the names in std::? It will be
huge! All I can suggest is google it.

<pause>

hmmm. maybe not such a good idea. Most hits seemed to be trying
to answer questions like "Why does it hurt when I pee?"
--
Nick Keighley

Why I can't find the "using namespace std "in <ios>,<iostreamand
<string???
Thanks!
Mar 27 '08 #3
On Thu, 27 Mar 2008 06:36:36 -0700, Nick Keighley wrote:
On 27 Mar, 12:53, 322322 <714794...@qq.comwrote:
>Could anybody tell where is the namespace std file ? Thanks a lot !
namespace::std{
[...]
So since you can't have what you asked for, what do you really want? Do
you want a list of all the names in std::? It will be huge! All I can
suggest is google it.

<pause>

hmmm. maybe not such a good idea. Most hits seemed to be trying to
answer questions like "Why does it hurt when I pee?"
LOL!

Try sticking a "C++" in front of that...

--
Lionel B
Mar 27 '08 #4
On Thu, 27 Mar 2008 07:21:29 -0700, 322322 wrote:
Nick Keighley 写道:
>On 27 Mar, 12:53, 322322 <714794...@qq.comwrote:
Could anybody tell where is the namespace std file ? Thanks a lot !
namespace::std{

since a namespace isn't a file there is no namespace std (abbreviated
to std:: in this post) file. The things that are in std:: such as
std::cout are defined in standard includes

#include <iostream>

these *may* be implemented as files. But the mapping is not defined by
the language definition (possibilities are iostream and iostream.h).

So since you can't have what you asked for, what do you really want? Do
you want a list of all the names in std::? It will be huge! All I can
suggest is google it.
[...]
Why I can't find the "using namespace std "in <ios>,<iostreamand
<string???
Why would you expect to find "using namespace std" in those headers? They
don't "use" namespace std, they declare things *in* namespace std. E.g.
if some function `void foo()' in namespace `joe' were declared in some
header, you would expect to see:

namespace joe
{
void foo();
}

in that header. I'd suggest reading about namespaces in a good C++ book.

--
Lionel B
Mar 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

54
by: Brandon J. Van Every | last post by:
I'm realizing I didn't frame my question well. What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes you jump up in your chair and scream "Wow! Ruby has *that*? That is SO...
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
1
by: Tony Johansson | last post by:
Hello I'm trying to learn XML by reading a book. There is some text in the book that I don't understand so I try to ask you out there. My first question is does this statement mean that ...
4
by: ad | last post by:
Is there any difference about namespace between VB.NET and C#. All functions in c# must include in a namespace. Why I can't find namespace in the files .vb . How VB.NET implement the...
5
by: ad | last post by:
Is there any difference about namespace between VB.NET and C#. All functions in c# must include in a namespace. Why I can't find namespace in the files .vb . How VB.NET implement the...
161
by: KraftDiner | last post by:
I was under the assumption that everything in python was a refrence... so if I code this: lst = for i in lst: if i==2: i = 4 print lst I though the contents of lst would be modified.....
75
by: Steven T. Hatton | last post by:
No, this is not a troll, and I am not promoting Java, C-flat, D, APL, Bash, Mathematica, SML, or LISP. A college teacher recently posted to this newsgroup regarding her observation that there has...
6
by: Juha Nieminen | last post by:
Whenever one sees example C++ code basically anywhere, be it in a book, in a tutorial in the internet, in an online forum or whatever, I would estimate that at least in 99% of cases one sees the...
6
by: WaterWalk | last post by:
I find friend declaration just very tricky. I tried the following examples on both MingW(gcc 3.4.2) and VC++ 2005. The results are surprising. Example1: namespace ns1 { class Test { friend...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.