C++中 sprintf函数的用法

C++中 sprintf函数的用法 1.经常使用方式 sprintf函数的功能与printf函数的功能基本同样,只是它把结果输出到指定的字符串中了,看个例子就明白了:ios 例:将”test 1 2”写入数组s中c++ #include<stdio.h> int main(int argc, char *avgv[]) { char s[40]; sprintf(s,"%s%d%c
相关文章
相关标签/搜索