字符串合并

#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;
}

posted @ 2011-11-11 09:43  byfei  阅读(121)  评论(0编辑  收藏  举报