字符串合并

#include<iostream>
using namespace  std;

#include<stdio.h>
int main( )

 char test01 [100]="你被禁言";
 char strTime [50];
 sprintf(strTime,"%d",100);
 strcat(test01,strTime);
 strcat(test01,"秒");
 cout<<test01<<endl;
 system("pause");
 return 0;
}

原文地址:https://www.cnblogs.com/byfei/p/3112297.html