Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. About global namespace in cwchar.h

About global namespace in cwchar.h

Scheduled Pinned Locked Moved Managed C++/CLI
helpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    minihotto
    wrote on last edited by
    #1

    There are some errors. error C2039: 'btowc' : is not a member of '`global namespace'' in cwchar.h I see some information about gloabal namespace, but i dont understand why it comes some errors. Is it because cwchar.h file is obsolete? If it is, what can I do if I need to use the file? Can somebody help me to solve the problem? Thx for ur reply. Jane.

    G 1 Reply Last reply
    0
    • M minihotto

      There are some errors. error C2039: 'btowc' : is not a member of '`global namespace'' in cwchar.h I see some information about gloabal namespace, but i dont understand why it comes some errors. Is it because cwchar.h file is obsolete? If it is, what can I do if I need to use the file? Can somebody help me to solve the problem? Thx for ur reply. Jane.

      G Offline
      G Offline
      George L Jackson
      wrote on last edited by
      #2

      The header file "cwchar.h" puts btowc into the std namespace:   namesapce std {     using ::btowc;    ...   } Thus, you will have to prefix btowc with std, std::btowc, or place this in your code:   using std::btowc or this:   using namespace std; before using btowc. In the future, please ask C++ related questions in the Visual C++ / MFC forum. -- modified at 14:38 Tuesday 30th October, 2007

      "We make a living by what we get, we make a life by what we give." --Winston Churchill

      M 1 Reply Last reply
      0
      • G George L Jackson

        The header file "cwchar.h" puts btowc into the std namespace:   namesapce std {     using ::btowc;    ...   } Thus, you will have to prefix btowc with std, std::btowc, or place this in your code:   using std::btowc or this:   using namespace std; before using btowc. In the future, please ask C++ related questions in the Visual C++ / MFC forum. -- modified at 14:38 Tuesday 30th October, 2007

        "We make a living by what we get, we make a life by what we give." --Winston Churchill

        M Offline
        M Offline
        minihotto
        wrote on last edited by
        #3

        I see. Thx for ur reply.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups