我是靠谱客的博主 纯真时光,这篇文章主要介绍C++中char和int转化,现在分享给大家,希望可以做个参考。

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

最后

以上就是纯真时光最近收集整理的关于C++中char和int转化的全部内容,更多相关C++中char和int转化内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(120)

评论列表共有 0 条评论

立即
投稿
返回
顶部