我正在尝试将 CString 转换为无符号整数。我已经查找并获得了转换为 unsigned long 的结果,但找不到 int 的任何结果。我知道这很简单,但这让我有点困惑。
有什么建议吗?
需要这样的东西:
CString abc;
unsigned int xyz;
xyz = (unsigned int)abc;
干杯。
最佳答案
使用_tcstoul
从字符串中获取unsigned long值,然后将该值转换为unsigned int。
关于c++ - 将 MFC CString 转换为无符号整数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7820926/