It looks like it should work okay. You could also do this:
int val = atoi(theCString.GetAsciiString());
or if you prefer Unicode
int val = _wtoi(theCString.GetWideString());
> Hi All,
>
> Excuse my laziness - I'm hoping there is a nice way to convert a
> CString to an int, but I've not found it yet.
>
> I'm just trying a int nohope = CValue(theCString);
>
> No errors compiling, but I've not got far enough to test it yet.
>
> Cheers,
>
> Alan.
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
> unsubscribe xsi
>
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi