2013年7月31日
摘要: 我们经常需要将string类型转换为int、long、double、float类型,cctype头文件提供了转换前的验证函数isdigit()和isxdigit()。经vs2010实验:int main(){ std::string strDigit="123.35"; std::string strXDigit="0x56"; char* szDigit="456.123"; char* szXDigit="0x57"; std::locale loc(""); if (isdigit(*sz 阅读全文
posted @ 2013-07-31 11:44 三条腿的蛤蟆 阅读(3693) 评论(0) 推荐(1)