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
相關文章
相關標籤/搜索