namespaces

This is a discussion on namespaces within the C++ Programming forums, part of the General Programming Boards category; What would prompt an error telling me that "std is not recognized as a namespace, blah blah blah..." while attempting ...

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    24

    namespaces

    What would prompt an error telling me that "std is not recognized as a namespace, blah blah blah..." while attempting to use 'std::string'? Obviously std is a namespace, so that error seems rather absurd to me.

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,169
    You aren't including the proper header, so the compiler can't find the std namespace!
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  3. #3
    Registered User
    Join Date
    Jan 2008
    Posts
    24
    Ah... thanks. I guess I overlooked it since it normally tells me "unreferenced identifier" when I forget to include the header. Stupid me!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. namespaces or static classes ?? you decide
    By Hussain Hani in forum C++ Programming
    Replies: 9
    Last Post: 07-11-2009, 11:20 AM
  2. need help wiht using classes...namespaces...
    By hockey97 in forum C++ Programming
    Replies: 9
    Last Post: 09-02-2008, 02:22 PM
  3. C and namespaces
    By oyse in forum C Programming
    Replies: 2
    Last Post: 05-05-2004, 09:39 AM
  4. namespaces and friends
    By okinrus in forum C++ Programming
    Replies: 1
    Last Post: 03-27-2004, 07:47 AM
  5. custom namespaces
    By uvacow in forum C# Programming
    Replies: 2
    Last Post: 03-16-2004, 01:53 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21