摘要:
来自http://yuweiqiang.blog.163.com/blog/static/6657041201009102431903/C语言提供了几个标准库可以将任意类型(整型、长整型、浮点型等)数字转换为串以下是用itoa将整数转换为串个例子:# <stdio.h># <stdlib.h>void (void){num = 100;char str[25];itoa(num, str, 10);prf("The number 'num' is %d and the 'str' is %s. \n" ,num, st 阅读全文
摘要:
VS2005中,数学函数的参数检查更为严格,如pow(2, 45)会引起一个错误提示如下:error C2668: “pow”: 对重载函数的调用不明确d:\program files\microsoft visual studio 8\vc\include\math.h(575): 可能是“long double pow(long double,int)”d:\program files\microsoft visual studio 8\vc\include\math.h(527): 或“float pow(float,int)”d:\program files\microsoft vis 阅读全文
摘要:
来自http://blog.csdn.net/endcorps/archive/2010/05/30/5634968.aspxWarning C4819:The file contains a character that can ot be represented in the current code page(936). save the file in unicode format to prevent data loss.中文意思是:该文件包含不能在当前代码页中表示的字符,请将文件保存为Unicode格式,以防止数据丢失。一般来说,这个警告没有什么影响。要想去掉这个警告的方法有:(1 阅读全文
摘要:
来自http://blog.sina.com.cn/s/blog_4ded4a890100j2nz.html 将过去的工程用VS2005打开的时候。你有可能会遇到一大堆的警告:warning C4996。比如:warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. 原因是Visual C++ 2005使用了更加安全的run-tim 阅读全文