Re: CString to int

Date : Wed, 2 Aug 2006 14:24:59 +0100
To : XSI(at)Softimage.COM
From : "Alan Jones" <skyphyr(at)gmail.com>
Subject : Re: CString to int
Thanks Andy,

The using the CValue did work (hooray) - not sure why CString doesn't
have more useful functions - Qt's QString is a really nice example of
a string library.

Cheers,

Alan.

On 8/2/06, Andy Nicholas <andy(at)andynicholas.com> wrote:

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

---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.