Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

'std' : a namespace with this name does not exist

Managed C++ namespace

  • Please log in to reply
5 replies to this topic

#1 Nishantstech

Nishantstech

    CC Lurker

  • New Member
  • Pip
  • 7 posts

Posted 04 September 2011 - 11:06 PM

Hi all,
I am creating dll and in .cpp file i am just adding "using namespace std".
while compiling i am getting error like " 'std': a namespace with this name doesn't exist".
Kindly help.
Nishant.
  • 0

#2 ZekeDragon

ZekeDragon

    CC Leader

  • Retired Mod
  • PipPipPipPipPipPipPip
  • 1263 posts

Posted 05 September 2011 - 02:54 AM

Have you included any standard header in your source document? If you haven't yet, then namespace std hasn't been declared.

Please provide source with the problem.
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#3 Nishantstech

Nishantstech

    CC Lurker

  • New Member
  • Pip
  • 7 posts

Posted 05 September 2011 - 03:21 AM

i have just added "using namespace std" to use all the standard functions.
I have not added any header files.
  • 0

#4 ZekeDragon

ZekeDragon

    CC Leader

  • Retired Mod
  • PipPipPipPipPipPipPip
  • 1263 posts

Posted 05 September 2011 - 03:34 AM

You will need to include a standard header file which defines the std namespace, else your compiler will tell you that the std namespace does not exist. :P
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#5 Nishantstech

Nishantstech

    CC Lurker

  • New Member
  • Pip
  • 7 posts

Posted 05 September 2011 - 04:59 AM

Thanks :)
  • 0

#6 Ancient Dragon

Ancient Dragon

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 378 posts

Posted 26 October 2011 - 05:26 AM

If you want to use containers in your program then use the ones in include/cliext folder instead of std c++ containers -- they are in namespace cliext, not std.
  • 0
Visit Grandpa's Forums, a social networking forum, with family-oriented arcade games, blogs, discussion forums, and photo albums.





Also tagged with one or more of these keywords: Managed C++, namespace

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download