标签:stream 二维 数组 end tmp pre mes space turn
删除二维字符数组其中一行,并用下一行进行填补
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
char tmp[3][5];
cin>>tmp[0]>>tmp[1]>>tmp[2];
// cout<<tmp[0]<<endl<<tmp[1]<<endl<<tmp[2]<<endl;
for(int i=0;i<2;i++)
{
strcpy(tmp[i],tmp[i+1]);
}
cout<<endl;
cout<<tmp[0]<<endl<<tmp[1]<<endl;
return 0;
}
标签:stream 二维 数组 end tmp pre mes space turn
原文地址:https://www.cnblogs.com/HurryXin/p/10256826.html