请教关于在c++项目中gcvt的用法
char actualString[255];
CSTR& CSTR::operator+(double number){
char temp [20];
_gcvt_s (number,10,temp,9);
strcat_s (this->actualString,temp);
return g_strString;
}
这里的_gcvt_s我还用了gcvt和gcvt_s调试,都不行
用gcvt的结果是:warning C4996: 'gcvt': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _gcvt. See online help for details.
_gcvt的结果是:warning C4996: '_gcvt': This function or variable may be unsafe. Consider using _gcvt_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
_gcvt_s需要四个参数,加粗部分是我最后加的报错结果是:error C2664: “errno_t _gcvt_s(char *,size_t,double,int)”: 不能将参数 1 从“double”转换为“char *”
我用是vs2008,字符集选了unicode和多字符集结果是相同的.
请各位高手帮忙,谢谢.