1 |
Spider <spider@g.o> writes: |
2 |
|
3 |
> Richard Reich <rreich@×××××××.com> wrote: |
4 |
> |
5 |
> > #include <iostream> |
6 |
> > using namespace std; |
7 |
> > int main(){ |
8 |
> > cout << "Hello World" << endl; |
9 |
> > return(0); |
10 |
> > } |
11 |
> |
12 |
> according to the ml posts I've read this is bad practice and one |
13 |
> should use std::cout whenever/wherever there is need of it. I'm |
14 |
> good at bad practice though ;) |
15 |
|
16 |
the point is mostly to avoid cluttering the global namespace with |
17 |
identifiers. you can move the "using namespace <foo>" into a |
18 |
containing block if need be: |
19 |
|
20 |
#include <iostream> |
21 |
int main(){ |
22 |
using namespace std; |
23 |
cout << "Hello World" << endl; |
24 |
return(0); |
25 |
} |
26 |
|
27 |
-- |
28 |
Terje |