int转 string

来源:互联网 发布:皇室战争恶搞卡牌软件 编辑:程序博客网 时间:2024/06/07 12:19
#include "stdafx.h"#include <iostream>#include <stdlib.h>#include <string>using namespace std;int _tmain(int argc, _TCHAR* argv[]){int number = 12345;    char buffer[100];sprintf (buffer, "%d plus qwer", number);    printf("integer = %d string = %s\n", number, buffer);    return 0;}

0 0
原创粉丝点击