Problems with wchar_t's

This is a discussion on Problems with wchar_t's within the C++ Programming forums, part of the General Programming Boards category; Hey,
I just started programming from home and I'm a little confused. Here's some sample code that I think worked ...

Probably you compiling as UNICODE
add L before string literals to indicate that this is the UNICODE string
test.FindOneOf(L"0123456789");

while on the surface this seems like the solution and probably is, but looking deeper I'd have to question MFC and CString.

If CString takes an Ansi string during construction and successfully creates an "ANSI" CString, shouldn't it's member functions also be ANSI or know how to deal with it. Even if he is compiling in Unicode, you'd think ANSI CStrings can still be created/used and passed to functions for example that is expecting an ANSI string

And why do you think that the BaseType is char and not wchar_t? just because CString was succesfully constructed using ANSI String?

A. Assuming FindOneOf() can take a CString as it's parameter.
B. Assuming from your statement CString has a conversion constructor that takes a const char*

FindOneOf( "some const char*") should work.

In looking at original question, I would guess, this example was contrived for posting the question and not actual code, otherwise I would bet that the first statement would give an error too. Let me go fire up Visual studio and test....

***UPDATE**** I am right, the first line gives an error also, i.e. a Unicode CString can't be constructed from a const char*