About global namespace in cwchar.h
-
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.
-
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.
The header file "cwchar.h" puts
btowc
into thestd
namespace: namesapce std { using ::btowc; ... } Thus, you will have to prefixbtowc
withstd
,std::btowc
, or place this in your code:using std::btowc
or this:using namespace std;
before usingbtowc
. 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
-
The header file "cwchar.h" puts
btowc
into thestd
namespace: namesapce std { using ::btowc; ... } Thus, you will have to prefixbtowc
withstd
,std::btowc
, or place this in your code:using std::btowc
or this:using namespace std;
before usingbtowc
. 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