简体   繁体   中英

Convert an MFC CString to an unsigned integer

I am trying to convert a CString to an unsigned int. I have looked up and got results for conversion to unsigned long but couldn't find anything for int as such. I know this is simple, but its kind of confusing me a bit.

Any suggestions?

Need something like this:

CString abc;
unsigned int xyz;

xyz = (unsigned int)abc;

Cheers.

使用_tcstoul从string中获取unsigned long值,然后将值转换为unsigned int。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM