Get a char from a CString

Posted by Sunscreen on Stack Overflow See other posts from Stack Overflow or by Sunscreen
Published on 2010-05-21T09:38:04Z Indexed on 2010/05/21 9:40 UTC
Read the original article Hit count: 200

Filed under:
|

I have created a function that has as input a char szMyChar; (using it in a switch statement).

Now I have a CString havong just a char, lets say CString strString = "A";

An option to call the function could be:

if (strString == "A") CallMyFunc('A');

though it is clumsy. I tried atoi (returns 0) and casting though neither works.

Any ideas?

Thanks, Sun

© Stack Overflow or respective owner

Related posts about c

    Related posts about c++