|
-
October 14th, 1999, 08:13 AM
#1
Converting CString to int.
How can I convert a CString, which has extracted the writing on a button (always a number in my app), into an ineteger that I can pass to a function taking integer values?
thanks
steve
-
October 14th, 1999, 08:25 AM
#2
Re: Converting CString to int.
Hi, simply use atoi function.
CString str = "123";
int n = atoi(str); // CString is casted automatically to LPCTSTR by the CString operator LPCTSTR
-
October 14th, 1999, 08:34 AM
#3
Re: Converting CString to int.
Hi,
use operator LPCTSTR ()for converting CString object.Then use atoi(LPCTSTR).
Hope this helps you.
Manash
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|