c 语言开发如何将数字转换成字符串?

您所在的位置:网站首页 c语言如何定义字符串 c 语言开发如何将数字转换成字符串?

c 语言开发如何将数字转换成字符串?

#c 语言开发如何将数字转换成字符串?| 来源: 网络整理| 查看: 265

下面源码改自 Windows Kits 10.0.22000.0

#include #include enum { FL_SIGNED = 0x01, FL_NEGATIVE = 0x02, FL_OVERFLOW = 0x04, FL_READ_DIGIT = 0x08 }; unsigned int parse_digit(const char c) { if (c >= '0' && c = 'a' && c = 'A' && c (unsigned int)(-LONG_MIN)) return TRUE; if ((flags & FL_NEGATIVE) == 0 && number > (unsigned int)(LONG_MAX)) return TRUE; } return FALSE; } unsigned int parse_integer(const char* source, int base, const BOOL is_result_signed) { if (source == 0) return 0; assert(base == 0 || (2 max_pre_multiply_value) | (number_after_add


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3