# using namespace std

**URL:** <https://forums.developer.nvidia.com/t/using-namespace-std/130393>\
**Category:** Legacy PGI Compilers (archived)\
**Created:** [July 3, 2006, 7:37pm UTC](https://forums.developer.nvidia.com/t/using-namespace-std/130393 "2006-07-03T19:37:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![steabert](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@steabert](https://forums.developer.nvidia.com/u/steabert)\
**Post date:** [July 3, 2006, 7:37pm UTC](https://forums.developer.nvidia.com/t/using-namespace-std/130393/1 "2006-07-03T19:37:29Z")

</div>

Hi,

If I don’t use the statement:

using namespace std;

pgCC still recognizes e.g. “endl”, while g++ doesn’t.

why?

---

<div class="post-metadata">

**Author:** ![MatColgrove](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/matcolgrove/32/14047_2.png) [@MatColgrove](https://forums.developer.nvidia.com/u/MatColgrove)\
**Post date:** [July 5, 2006, 6:01pm UTC](https://forums.developer.nvidia.com/t/using-namespace-std/130393/2 "2006-07-05T18:01:44Z")

</div>

Hi steabert,

Different compilers have different default options and pgCC uses the standard namepsace by default. To override this default, add “–no\_using\_std” to the compilation line.

- Mat

---

<div class="post-metadata">

**Author:** ![steabert](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@steabert](https://forums.developer.nvidia.com/u/steabert)\
**Post date:** [July 5, 2006, 6:04pm UTC](https://forums.developer.nvidia.com/t/using-namespace-std/130393/3 "2006-07-05T18:04:13Z")

</div>

Hi,

thanks for the clarification.
