I have created a function that has as input a char szMyChar; (using it in a switch statement).
Now I have a CString having 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
Either I’m not quite understanding what you’re asking, or it’s as simple as:
See Accessing Individual Characters in a CString for more information.