Hello, 大家好,我是爱吃香蕉的猴子,char类型和int类型转换
#include <iostream>
#include <windows.h>
#include <cstring>
using namespace std;
int main() {
char s1[10] = "wayne";
char s2[10];
int n = 10;
itoa(n, s2, 10);
strcat(s1,s2);
cout << s1 << endl;
system("pause");
return 0;
}
Code的搬运工V1.0